New user can't log in

Nextcloud version (eg, 20.0.5): 20.0.12
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04.6 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29 (Ubuntu)
PHP version (eg, 7.4): 7.4.29

The issue you are facing:

I create a new user and can’t login with that, in the log this error appears:

Is this the first time you’ve seen this error? don’t know, I rarely create users

Steps to replicate it:

  1. create user with password via webgui
  2. try to login

The output of your Nextcloud log in Admin > Logging:

[no app in context] Warning: Login failed: Marc (Remote IP: 80.138.247.82)

POST /nxc/index.php/login
from 80.138.247.82 at 2022-05-31T21:52:30+00:00

I also see this error, don’t know if related:

Error PHP Error: file_exists(): open_basedir restriction in effect. File(/templates/) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/Base.php#68

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '????????????????',
  'passwordsalt' => '??????????????????',
  'secret' => '?????????????????????',
  'trusted_domains' =>
  array (
    0 => 'www.oeschey.de',
    1 => 'oeschey.de',
  ),
  'datadirectory' => '/var/www/vhosts/oeschey.de/httpdocs/nxc/data',
  'dbtype' => 'mysql',
  'version' => '20.0.12.1',
  'overwrite.cli.url' => 'http://www.oeschey.de/nxc',
  'dbname' => 'nxc',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nxc',
  'dbpassword' => '??????????????',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nxc',
  'mail_domain' => 'oeschey.de',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'updater.secret' => '????????',
);

The output of your Apache/nginx/system log in /var/log/____:

only a few hacking attempts, e.g.

[Wed Jun 01 02:34:45.671876 2022] [core:error] [pid 17710] [client 193.106.191.48:36268] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

pastebin https://pastebin.com/eWe7cBcs password nmL4H6CQ68

Hey,

please take a few minutes and try to format your post, this makes it a lot easier to help you - I nearly missed the pastebin link and password…

Did you recently update PHP (or your provider)? There was a discussion about open_basedir changes at https://github.com/nextcloud/server/issues/27759 looks like a fix was implemented, but only in NC 21 and above. Not sure if this will even fix your problem, but any reason still running NC 20? (It reached EOL already).

sorry, I’m not very fluent with formatting options here :wink: I reformatted it, hoping it’s better now.
I update NC as soon as it sends me a mail to update, maybe i missed something? PHP shouldn’t have updated recently (I’m in the hands of plesk here)

Have a look at Maintenance and Release Schedule · nextcloud/server Wiki · GitHub
There are quite a few releases after 20.0.12. You might want to check why there’s no new update available to you. Check the logs if there’s anything of interest.

And thanks for the formatting :+1:

I found within the Gui now that there are updates, 2.0.14 went through, 21.0.9 is running now… seems I have a problem with backups, since plesk does it’s own thing and uses a lot of disk space for that very site:

root@h1884536:/var/lib/psa/dumps/domains/oeschey.de# du -h -d1 .
4,4M    ./sites
8,7M    ./.discovered
32M     ./databases
470G    .

Does the login work again? :slight_smile:

nope… I’m on 23.0.5 update now :wink:

hm, 23.0.5 update doesn’t work, even if I freed up a lot of disk space… I can delete .step as often as I want, it fails at backup. But since all the updates until now failed to fix the initeial issue, I doubt, the 23.0.5 will…

<HTML>
<HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator to inform of the time the error occurred
and of anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>
Web Server at oeschey.de
</ADDRESS>
</BODY>
</HTML>

and I still have lots of errors in logging

Error	index	Exception: Return value of OCA\ServerInfo\PhpStatistics::getOPcacheStatus() must be of the type array, null returned		2022-06-01T21:44:42+0200
Error	PHP	Error: opcache_get_status() has been disabled for security reasons at /var/www/vhosts/oeschey.de/httpdocs/nxc/apps/serverinfo/lib/PhpStatistics.php#68		2022-06-01T21:44:42+0200
Error	PHP	Error: Invalid argument supplied for foreach() at /var/www/vhosts/oeschey.de/httpdocs/nxc/apps/serverinfo/lib/OperatingSystems/DefaultOs.php#149		2022-06-01T21:44:42+0200
Error	PHP	Error: is_file(): open_basedir restriction in effect. File(/l10n/en.js) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/ResourceLocator.php#106		2022-06-01T21:30:42+0200
Error	PHP	Error: file_exists(): open_basedir restriction in effect. File(/templates/) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/Base.php#68		2022-06-01T21:30:42+0200
Error	PHP	Error: is_file(): open_basedir restriction in effect. File(/l10n/en.js) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/ResourceLocator.php#106		2022-06-01T21:30:34+0200
Error	PHP	Error: file_exists(): open_basedir restriction in effect. File(/templates/) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/Base.php#68		2022-06-01T21:30:34+0200
Error	PHP	Error: is_file(): open_basedir restriction in effect. File(/l10n/en.js) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/ResourceLocator.php#106		2022-06-01T21:30:30+0200
Error	PHP	Error: file_exists(): open_basedir restriction in effect. File(/templates/) is not within the allowed path(s): (/var/www/vhosts/oeschey.de/:/tmp/) at /var/www/vhosts/oeschey.de/httpdocs/nxc/lib/private/Template/Base.php#68		2022-06-01T21:30:30+0200
Error	index	Exception: Return value of OCA\ServerInfo\PhpStatistics::getOPcacheStatus() must be of the type array, null returned		2022-06-01T21:30:30+0200
Error	PHP	Error: opcache_get_status() has been disabled for security reasons at /var/www/vhosts/oeschey.de/httpdocs/nxc/apps/serverinfo/lib/PhpStatistics.php#83		2022-06-01T21:30:30+0200
Error	PHP	Error: Invalid argument supplied for foreach() at /var/www/vhosts/oeschey.de/httpdocs/nxc/apps/serverinfo/lib/OperatingSystems/DefaultOs.php#158

seems to be quite old and persistent… since we use nextcloud only as cheap dropbox alternative, it makes me think about changing