Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 9.1 fails on Remove shares of a users root folder #25621

Closed
compuguy opened this issue Jul 26, 2016 · 13 comments
Closed

Upgrade to 9.1 fails on Remove shares of a users root folder #25621

compuguy opened this issue Jul 26, 2016 · 13 comments

Comments

@compuguy
Copy link

compuguy commented Jul 26, 2016

Steps to reproduce

  1. ran dist upgrade on server
  2. ran php occ upgrade as www-data in a screen session
  3. fails on Remove shares of a users root folder with this error:

2/246 InvalidArgumentException: $absolutePath must be relative to "files"
Update failed
Maintenance mode is kept active
Reset log level

Expected behaviour: Upgrade succeeds

Actual behavior: errors out with InvalidArgumentException (see step 3 for exact error).

Operating System: Ubuntu 14.04.4
Web server: apache 2.4.7 (Ubuntu)
Database: Mysql 5.5.50-0-ubuntu0.14.04.1
owncloud version: 9.1
Attempted update from 9.0.3
Installed owncloud via official ubuntu 14.04 repo on owncloud site
Cant check signing status because owncloud in maintenance mode

List of activated apps:

activity 2.3.2
comments: 0.3.0
dav: 0.2.5
encryption: 1.3.0
federatedfilesharing: 0.3.0
federation: 0.1.0
files: 1.5.1
files_external: 0.6.0
files_pdfviewer: 0.8.1
files_sharing: 0.10.0
files_texteditor: 2.1
files_trashbin: 0.9.0
files_versions: 1.3.0
files_videoplayer:0.9.8
firstrunwizard: 1.1
gallery: 15.0.0
notifications: 0.3.0
provisioning_api: 0.5.0
systemtags: 0.3.0
templateeditor: 0.1
updatenotification: 0.2.1
user_ldap: 0.9.0

Ussing external storage: local
Not using encryption

LDAP backend in use will post redacted config later

Owncloud output:

{"reqId":"b0MZ+U/YsMybAziVjaqv","remoteAddr":"","app":"core","message":"Exception: {"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to \"files\"","Code":0,"Trace":"#0 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1955): OC\Files\View->getPathRelativeToFiles('\/22BDDDDB-9659-...')\n#1 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1112): OC\Files\View->changeLock('\/22BDDDDB-9659-...', 2)\n#2 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(261): OC\Files\View->basicOperation('mkdir', '\/22BDDDDB-9659-...', Array)\n#3 \/var\/www\/owncloud\/lib\/private\/Files\/Node\/Folder.php(144): OC\Files\View->mkdir('\/22BDDDDB-9659-...')\n#4 \/var\/www\/owncloud\/lib\/private\/Files\/Node\/Root.php(344): OC\Files\Node\Folder->newFolder('\/22BDDDDB-9659-...')\n#5 [internal function]: OC\Files\Node\Root->getUserFolder('22BDDDDB-9659-4...')\n#6 \/var\/www\/owncloud\/lib\/private\/Files\/Node\/LazyRoot.php(64): call_user_func_array(Array, Array)\n#7 \/var\/www\/owncloud\/lib\/private\/Files\/Node\/LazyRoot.php(281): OC\Files\Node\LazyRoot->__call('getUserFolder', Array)\n#8 \/var\/www\/owncloud\/lib\/private\/Repair\/RemoveRootShares.php(82): OC\Files\Node\LazyRoot->getUserFolder('22BDDDDB-9659-4...')\n#9 \/var\/www\/owncloud\/lib\/private\/User\/Manager.php(349): OC\Repair\RemoveRootShares->OC\Repair\{closure}(Object(OC\User\User))\n#10 \/var\/www\/owncloud\/lib\/private\/Repair\/RemoveRootShares.php(101): OC\User\Manager->callForAllUsers(Object(Closure))\n#11 \/var\/www\/owncloud\/lib\/private\/Repair\/RemoveRootShares.php(73): OC\Repair\RemoveRootShares->removeRootShares(Object(OC\Repair))\n#12 \/var\/www\/owncloud\/lib\/private\/Repair.php(87): OC\Repair\RemoveRootShares->run(Object(OC\Repair))\n#13 \/var\/www\/owncloud\/lib\/private\/Updater.php(267): OC\Repair->run()\n#14 \/var\/www\/owncloud\/lib\/private\/Updater.php(150): OC\Updater->doUpgrade('9.1.0.15', '9.0.3.2')\n#15 \/var\/www\/owncloud\/core\/Command\/Upgrade.php(290): OC\Updater->upgrade()\n#16 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Command\/Command.php(259): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#17 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Application.php(844): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#18 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#19 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#20 \/var\/www\/owncloud\/lib\/private\/Console\/Application.php(146): Symfony\Component\Console\Application->run(NULL, NULL)\n#21 \/var\/www\/owncloud\/console.php(94): OC\Console\Application->run()\n#22 \/var\/www\/owncloud\/occ(11): require_once('\/var\/www\/ownclo...')\n#23 {main}","File":"\/var\/www\/owncloud\/lib\/private\/Files\/View.php","Line":2082}","level":3,"time":"2016-07-26T13:43:44+00:00","method":"--","url":"--","user":"--"}

@compuguy
Copy link
Author

This is a similar error to issue #25535

@PVince81
Copy link
Contributor

PVince81 commented Aug 9, 2016

Reformatting exception for readability:

{"reqId":"b0MZ+U/YsMybAziVjaqv","remoteAddr":"","app":"core","message":"Exception: {"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to "files"","Code":0,"Trace":"
#0 /var/www/owncloud/lib/private/Files/View.php(1955): OC\Files\View->getPathRelativeToFiles('/22BDDDDB-9659-...')n
#1 /var/www/owncloud/lib/private/Files/View.php(1112): OC\Files\View->changeLock('/22BDDDDB-9659-...', 2)n
#2 /var/www/owncloud/lib/private/Files/View.php(261): OC\Files\View->basicOperation('mkdir', '/22BDDDDB-9659-...', Array)n
#3 /var/www/owncloud/lib/private/Files/Node/Folder.php(144): OC\Files\View->mkdir('/22BDDDDB-9659-...')n
#4 /var/www/owncloud/lib/private/Files/Node/Root.php(344): OC\Files\Node\Folder->newFolder('/22BDDDDB-9659-...')n
#5 [internal function]: OC\Files\Node\Root->getUserFolder('22BDDDDB-9659-4...')n
#6 /var/www/owncloud/lib/private/Files/Node/LazyRoot.php(64): call_user_func_array(Array, Array)n
#7 /var/www/owncloud/lib/private/Files/Node/LazyRoot.php(281): OC\Files\Node\LazyRoot->__call('getUserFolder', Array)n
#8 /var/www/owncloud/lib/private/Repair/RemoveRootShares.php(82): OC\Files\Node\LazyRoot->getUserFolder('22BDDDDB-9659-4...')n
#9 /var/www/owncloud/lib/private/User/Manager.php(349): OC\Repair\RemoveRootShares->OC\Repair\{closure}(Object(OC\User\User))n
#10 /var/www/owncloud/lib/private/Repair/RemoveRootShares.php(101): OC\User\Manager->callForAllUsers(Object(Closure))n
#11 /var/www/owncloud/lib/private/Repair/RemoveRootShares.php(73): OC\Repair\RemoveRootShares->removeRootShares(Object(OC\Repair))n
#12 /var/www/owncloud/lib/private/Repair.php(87): OC\Repair\RemoveRootShares->run(Object(OC\Repair))n
#13 /var/www/owncloud/lib/private/Updater.php(267): OC\Repair->run()n
#14 /var/www/owncloud/lib/private/Updater.php(150): OC\Updater->doUpgrade('9.1.0.15', '9.0.3.2')n
#15 /var/www/owncloud/core/Command/Upgrade.php(290): OC\Updater->upgrade()n
#16 /var/www/owncloud/3rdparty/symfony/console/Command/Command.php(259): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))n
#17 /var/www/owncloud/3rdparty/symfony/console/Application.php(844): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))n
#18 /var/www/owncloud/3rdparty/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))n
#19 /var/www/owncloud/3rdparty/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))n
#20 /var/www/owncloud/lib/private/Console/Application.php(146): Symfony\Component\Console\Application->run(NULL, NULL)
#21 /var/www/owncloud/console.php(94): OC\Console\Application->run()n
#22 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')n
#23 {main}","File":"/var/www/owncloud/lib/private/Files/View.php","Line":2082}","level":3,"time":"2016-07-26T13:43:44+00:00","method":"--","url":"--","user":"--"}

@PVince81
Copy link
Contributor

PVince81 commented Aug 9, 2016

From reading the stack trace it looks like this user has never logged in and the cleanup routine's init code getUserFolder is trying to create that user's home. Let me see if I can recreate this locally.

@PVince81
Copy link
Contributor

PVince81 commented Aug 9, 2016

@owncloud/sharing any idea ?

@PVince81 PVince81 modified the milestones: 9.1.2, 9.1.1 Sep 21, 2016
@compuguy
Copy link
Author

compuguy commented Sep 29, 2016

Apparently this is an issue with @nextcloud/server as well during the upgrade. I wonder @PVince81 if this has anything to do with a LDAP user that hasn't logged in yet. Will have to look into this.

@PVince81
Copy link
Contributor

PVince81 commented Nov 9, 2016

Could not reproduce this issue even with LDAP users who never logged in.

@PVince81
Copy link
Contributor

PVince81 commented Nov 9, 2016

@compuguy mind sharing your LDAP config occ ldap:show-config ? Are you storing your home folders differently ? (shouldn't matter though)

@michaelstingl
Copy link

@PVince81 I had a user that reported the same issue, but it disappeared with the 2nd run of the upgrade.

@PVince81 PVince81 self-assigned this Nov 21, 2016
@PVince81 PVince81 modified the milestones: 9.1.4, 9.1.3 Nov 30, 2016
@compuguy
Copy link
Author

compuguy commented Dec 1, 2016

@PVince81 I'm no longer working for the company for which the nextcloud/owncloud instance had a issue with. You can try to contact @JamesonFinney about this issue for more information.

@PVince81 PVince81 modified the milestones: 9.1.5, 9.1.4 Feb 6, 2017
@PVince81
Copy link
Contributor

Closing this for now, unless we get more detailed information to reproduce this.

@kumashiro
Copy link

Same issue here. No LDAP. Fresh docker container from official image. I logged in as admin, changed account password, created a new user, logged out, tried to login on a new account and got "Internal server error message". I can still login as admin.

Error in logs:

[
   {
      "app" : "core",
      "user" : "beorn",
      "method" : "POST",
      "message" : "Exception when running cache gc: \"files/6d29539b827dddeb5fdceb18cfc716ec\" is locked",
      "remoteAddr" : "172.17.0.1",
      "reqId" : "21EWhBB6dJbypKwmmfAE",
      "level" : 2,
      "time" : "2017-05-25T18:05:32+00:00",
      "url" : "/index.php/login"
   },
   {
      "app" : "index",
      "user" : "beorn",
      "method" : "POST",
      "message" : "Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"$absolutePath must be relative to \\\"files\\\"\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php(1923): OC\\\\Files\\\\View->getPathRelativeToFiles('\\/beorn')\\n#1 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php(2020): OC\\\\Files\\\\View->lockPath('\\/beorn', 1, false)\\n#2 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php(1292): OC\\\\Files\\\\View->lockFile('\\/beorn', 1)\\n#3 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php(1339): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage), '', '\\/beorn')\\n#4 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/Node\\/Root.php(180): OC\\\\Files\\\\View->getFileInfo('\\/beorn')\\n#5 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/Node\\/Root.php(351): OC\\\\Files\\\\Node\\\\Root->get('\\/beorn')\\n#6 \\/var\\/www\\/owncloud\\/lib\\/private\\/Server.php(813): OC\\\\Files\\\\Node\\\\Root->getUserFolder('beorn')\\n#7 \\/var\\/www\\/owncloud\\/lib\\/private\\/User\\/Session.php(387): OC\\\\Server->getUserFolder('beorn')\\n#8 \\/var\\/www\\/owncloud\\/lib\\/private\\/User\\/Session.php(441): OC\\\\User\\\\Session->prepareUserLogin()\\n#9 \\/var\\/www\\/owncloud\\/lib\\/private\\/User\\/Session.php(287): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#10 \\/var\\/www\\/owncloud\\/core\\/Controller\\/LoginController.php(196): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#11 [internal function]: OC\\\\Core\\\\Controller\\\\LoginController->tryLogin(*** sensitive parameters replaced ***)\\n#12 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(159): call_user_func_array(Array, Array)\\n#13 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n#14 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/App.php(99): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n#15 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/Routing\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('LoginController', 'tryLogin', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#16 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#17 \\/var\\/www\\/owncloud\\/lib\\/private\\/Route\\/Router.php(280): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#18 \\/var\\/www\\/owncloud\\/lib\\/base.php(891): OC\\\\Route\\\\Router->match('\\/login')\\n#19 \\/var\\/www\\/owncloud\\/index.php(54): OC::handleRequest()\\n#20 {main}\",\"File\":\"\\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php\",\"Line\":2091}",
      "remoteAddr" : "172.17.0.1",
      "reqId" : "21EWhBB6dJbypKwmmfAE",
      "time" : "2017-05-25T18:05:32+00:00",
      "level" : 3,
      "url" : "/index.php/login"
   }
]

I also did DELETE FROM oc_file_locks WHERE 1 - didn't help.

Formatted traceback:

#0 /var/www/owncloud/lib/private/Files/View.php(1923): OC\Files\View->getPathRelativeToFiles('/beorn')
#1 /var/www/owncloud/lib/private/Files/View.php(2020): OC\Files\View->lockPath('/beorn', 1, false)
#2 /var/www/owncloud/lib/private/Files/View.php(1292): OC\Files\View->lockFile('/beorn', 1)
#3 /var/www/owncloud/lib/private/Files/View.php(1339): OC\Files\View->getCacheEntry(Object(OCA\Files_Trashbin\Storage), '', '/beorn')
#4 /var/www/owncloud/lib/private/Files/Node/Root.php(180): OC\Files\View->getFileInfo('/beorn')
#5 /var/www/owncloud/lib/private/Files/Node/Root.php(351): OC\Files\Node\Root->get('/beorn')
#6 /var/www/owncloud/lib/private/Server.php(813): OC\Files\Node\Root->getUserFolder('beorn')
#7 /var/www/owncloud/lib/private/User/Session.php(387): OC\Server->getUserFolder('beorn')
#8 /var/www/owncloud/lib/private/User/Session.php(441): OC\User\Session->prepareUserLogin()
#9 /var/www/owncloud/lib/private/User/Session.php(287): OC\User\Session->loginWithPassword(*** sensitive parameters replaced ***)
#10 /var/www/owncloud/core/Controller/LoginController.php(196): OC\User\Session->login(*** sensitive parameters replaced ***)
#11 [internal function]: OC\Core\Controller\LoginController->tryLogin(*** sensitive parameters replaced ***)
#12 /var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php(159): call_user_func_array(Array, Array)
#13 /var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Core\Controller\LoginController), 'tryLogin')
#14 /var/www/owncloud/lib/private/AppFramework/App.php(99): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Core\Controller\LoginController), 'tryLogin')
#15 /var/www/owncloud/lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('LoginController', 'tryLogin', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#16 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#17 /var/www/owncloud/lib/private/Route/Router.php(280): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#18 /var/www/owncloud/lib/base.php(891): OC\Route\Router->match('/login')
#19 /var/www/owncloud/index.php(54): OC::handleRequest()
#20 {main}

Image version: 9.1.4
Container directory /mnt/data is bound to a separate host file system (but without the "z" flag). It's writable and accessible.

@kumashiro
Copy link

OK, I just realized there's a new version available. This is what I've done:

  1. DROP TABLE
  2. Clear everything in /mnt/data
  3. Start container from owncloud/server:10.0.1 image (BTW, tag latest still points at 9.1.5)

Result: exactly the same problem, except that I cannot login even on admin account (first login after container start). Maybe Docker image is the problem here?

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants