With Nextcloud 11.0.0, when I try to create a new user after creating and logging into the admin account, i get a dialog that says that I must enter my password for this action. I try entering my password several times but it just asks again for the password and does not succeed. Starting over with Nextcloud 10.0.2, I don’t have this problem – the new user is created without a prompt for a password.
System information:
- Debian 8.5
- MariaDB 10.0.28 (also tried with mysql-server instead of mariadb-server and got same result)
- PHP 5.6.28
- Apache 2.4.10
My database and database user are both called nextcloud
. My admin account is named ncadmin
. I tried several guides for installing Nextcloud (e.g. How To Install and Configure Nextcloud on Ubuntu 16.04 | DigitalOcean and Complete NC installation on Debian with Spreed.me and TURN step by step) but got the same result.
Looking at the error log after installing 11.0.0 and logging into the admin account I see:
Error no app in context InvalidArgumentException: The given object name is invalid
/var/www/nextcloud/apps/activity/lib/FilesHooks.php - line 892: OC\Activity\Event->setObject('files', 2, false)
/var/www/nextcloud/apps/activity/lib/FilesHooks.php - line 184: OCA\Activity\FilesHooks->addNotificationsForUser('ncadmin', 'created_self', Array, 2, false, true, true, 0, 'file_created')
/var/www/nextcloud/apps/activity/lib/FilesHooks.php - line 111: OCA\Activity\FilesHooks->addNotificationsForFileAction('/', 'file_created', 'created_self', 'created_by')
/var/www/nextcloud/apps/activity/lib/FilesHooksStatic.php - line 45: OCA\Activity\FilesHooks->fileCreate('/')
[internal function] OCA\Activity\FilesHooksStatic fileCreate(Array)
/var/www/nextcloud/lib/private/legacy/hook.php - line 106: call_user_func(Array, Array)
/var/www/nextcloud/lib/private/Files/View.php - line 1237: OC_Hook emit('OC_Filesystem', 'post_create', Array)
/var/www/nextcloud/lib/private/Files/View.php - line 1163: OC\Files\View->runHooks(Array, '/ncadmin/files', true)
/var/www/nextcloud/lib/private/Files/View.php - line 266: OC\Files\View->basicOperation('mkdir', '/ncadmin/files', Array)
/var/www/nextcloud/lib/private/Files/Node/Folder.php - line 149: OC\Files\View->mkdir('/ncadmin/files')
/var/www/nextcloud/lib/private/Files/Node/Root.php - line 380: OC\Files\Node\Folder->newFolder('/ncadmin/files')
[internal function] OC\Files\Node\Root->getUserFolder('ncadmin')
/var/www/nextcloud/lib/private/Files/Node/LazyRoot.php - line 65: call_user_func_array(Array, Array)
/var/www/nextcloud/lib/private/Files/Node/LazyRoot.php - line 282: OC\Files\Node\LazyRoot->__call('getUserFolder', Array)
/var/www/nextcloud/lib/private/Server.php - line 948: OC\Files\Node\LazyRoot->getUserFolder('ncadmin')
/var/www/nextcloud/lib/private/User/Session.php - line 411: OC\Server->getUserFolder('ncadmin')
/var/www/nextcloud/lib/private/User/Session.php - line 479: OC\User\Session->prepareUserLogin(true)
/var/www/nextcloud/lib/private/User/Session.php - line 299: OC\User\Session->loginWithPassword(*** sensitive parameters replaced ***)
/var/www/nextcloud/lib/private/Setup.php - line 393: OC\User\Session->login(*** sensitive parameters replaced ***)
/var/www/nextcloud/core/Controller/SetupController.php - line 65: OC\Setup->install(Array)
/var/www/nextcloud/lib/base.php - line 957: OC\Core\Controller\SetupController->run(Array)
/var/www/nextcloud/index.php - line 40: OC handleRequest()
{main}
2016-12-14T05:48:25-0500
Error mysql.setup Specific user creation failed: An exception occurred while executing 'SELECT user FROM mysql.user WHERE user=?' with params ["oc_ncadmin"]: SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'nextcloud'@'localhost' for table 'user' 2016-12-14T05:47:56-0500
The second message there is pretty confusing to me. Why is it looking in mysql.user for oc_ncadmin? The database account in mysql.user is named nextcloud. Also, the admin user account is named ncadmin, not oc_ncadmin. Querying the mysql database from the command line, I do see a ncadmin
user in the users table (not oc_ncadmin
).
After trying and failing to create a new user, the following message appears in the log file:
Warning core Login failed: 'ncadmin' (Remote IP: 'xxx.xxx.xxx.xxx')
However, i can logout and log in again as ncadmin without a problem.
Looking at the error logs after installing 10.0.2 and logging in as the admin user, I see:
Error mysql.setup Database creation failed: An exception occurred while executing 'GRANT ALL PRIVILEGES ON `nextcloud` . * TO 'nextcloud'': SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'nextcloud'@'localhost' to database 'nextcloud' 2016-12-14T11:00:42+00:00 --
Error mysql.setup Specific user creation failed: An exception occurred while executing 'SELECT user FROM mysql.user WHERE user=?' with params ["oc_ncadmin"]: SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'nextcloud'@'localhost' for table 'user' 2016-12-14T11:00:42+00:00
So that mysql error shows up here as well. Creating a new user does not prompt for a password and does not generate any log messages. Any suggestions for what I could do to get account creation to work with Nextcloud 11?