[SOLVED] Admin is able to log into WebUI, but no users

Nextcloud version: 19.0
Operating system and version: Synology DSM 6.2.3-25426 (latest version)
Apache or nginx version: Apache 2.4.39
PHP version : 7.3

Hello Community

I upgraded to Nextcloud 19 on my Synology, first there was an error through the web updater, but with OCC the update was successful without errors. I can perfectly log in with the WebUI as an Admin, but not as a user. On the log in screen it takes about a minute and then a “504” Error screen.
I have found this old thread [Solved] Can't login via Web UI anymore but I don’t know, if that is connected to my problem.
Thanks for your help.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Update Nextcloud, first with errors, afterward with OCC without.
  2. Log in to Admin account without problems
  3. Don’t be able to log in to user accounts. It works with the App on MacOS though.

The output of your Nextcloud log in Admin > Logging:

[no app in context] Warning: Login failed:  (Remote IP: ***removed***, my IP)

POST /nextcloud/index.php/login
from 81.6.34.160 at 2020-06-08T10:40:40+00:00

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

<?php
$CONFIG = array (
  'instanceid' => '***removed***',
  'passwordsalt' => '***removed***',
  'secret' => '***removed***',
  'trusted_domains' =>
  array (
    0 => 'mydomain.synology.me',
  ),
  'datadirectory' => '/volume1/nextcloud/',
  'dbtype' => 'mysql',
  'version' => '19.0.0.12',
  'overwrite.cli.url' => 'https://mydomain.synology.me/',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '127.0.0.1:3307',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '***removed***',
  'dbpassword' => '***removed***',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '***removed***',
  'mail_domain' => '***removed***',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => '***removed***',
  'mail_smtpport' => '465',
  'mail_smtpname' => '***removed***',
  'mail_smtppassword' => '***removed***',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'updater.secret' => '***removed***',
  'app_install_overwrite' =>
  array (
    0 => 'documentserver_community',
  ),
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'data-fingerprint' => '***removed***',
);

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

2020-06-08T12:37:00+02:00 ***removed*** [Mon Jun 08 12:37:00.205931 2020] [autoindex:error] [pid 17369:tid 139646323304192] [client ***removed***:60648] AH01276: Cannot serve directory /var/services/web/: No matching DirectoryIndex (index.html,index.htm,index.cgi,index.php,index.php5) found, and server-generated directory index forbidden by Options directive
2020-06-08T12:41:48+02:00 ***removed*** [Mon Jun 08 12:41:48.513159 2020] [proxy_fcgi:error] [pid 17369:tid 139646298126080] (70007)The timeout specified has expired: [client ***removed***:34962] AH01075: Error dispatching request to : (polling)
2020-06-08T12:53:31+02:00 ***removed*** [Mon Jun 08 12:53:31.355830 2020] [proxy_fcgi:error] [pid 17369:tid 139646314911488] (70007)The timeout specified has expired: [client ***removed***:42948] AH01075: Error dispatching request to : (reading input brigade)

OK, i got some more information from the debug log from nextcloud.

[core] Debug: OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException: Current user is not logged in at <<closure>>

0. /volume1/web/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php line 98
   OC\AppFramework\Middleware\Security\SecurityMiddleware->beforeController(OCA\Notification ... {}, "listNotifications")
1. /volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 98
   OC\AppFramework\Middleware\MiddlewareDispatcher->beforeController(OCA\Notification ... {}, "listNotifications")
2. /volume1/web/nextcloud/lib/private/AppFramework/App.php line 137
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notification ... {}, "listNotifications")
3. /volume1/web/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\\Notificati ... r", "listNotifications", OC\AppFramework\ ... {}, {apiVersion: "v2 ... "})
4. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({apiVersion: "v2 ... "})
5. /volume1/web/nextcloud/lib/private/Route/Router.php line 297
   call_user_func(OC\AppFramework\ ... {}, {apiVersion: "v2 ... "})
6. /volume1/web/nextcloud/ocs/v1.php line 82
   OC\Route\Router->match("/ocsapp/apps/no ... s")
7. /volume1/web/nextcloud/ocs/v2.php line 24
   require_once("/volume1/web/nextcloud/ocs/v1.php")

GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications
from MYIP at 2020-06-09T10:29:52+00:00


Perhaps you can a a new user in your nextcloud, set password and login with this user. Does ist work?
Perhaps you can gib an old or new user the group “admin”. Does it work?

Because your admin can log in and other users not i think it is more a nextcloud problem (user, group, … in database) and not a webserver or php-problem.

Heyhey.

Thank you so much for your response.
OK. New user is working. There I can also log in. If I put the old user into the “admin” group, nothing changes.
So it should be a Nextcloud problem. Any ideas on how to find this?

[PHP] Error: session_start(): A session had already been started - ignoring at /volume1/web/nextcloud/lib/private/Session/Internal.php#209

GET /nextcloud/index.php/logout?requesttoken=rrDcyte9Y%2BBEIhA7qwl6GEj4aXnzMA0yRUg7sf4wQ30%3D%3A44eanoblGstwTkNo3WIqeya2Ex%2BpeHVICyVL%2FopEOQQ%3D

from MYIP at 2020-06-09T10:57:33+00:00

Perhaps disable and enable works:

sudo -u www-data php occ user:disable <username>
sudo -u www-data php occ user:enable <username>

OK. I think i managed to solve the problem. I guess the problem was, that with the update, the user databases were corrupted.

I renamed all the user directories in the ‘datadirectory’ to USER_old, then deleted the user and created a new user with the same name. afterwards i copied the userdirectory with rsync back

sudo -u http rsync -aP USER_old/ user

After i’ve done that to each user, i readded the files to each user with the following OCC command

sudo -u http php73 occ files:scan --all

This repopulates the databases with the files in each folder (see following thread Tutorial: How to migrate mass data to a new NextCloud server )

(Note: sudo -u http --> http is the user Apache uses under Synology, you may have to use www-data or ngix)

1 Like