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

Transfer file ownership to a new user that never logged in fails? #23881

Closed
koenlek opened this issue Apr 9, 2016 · 11 comments
Closed

Transfer file ownership to a new user that never logged in fails? #23881

koenlek opened this issue Apr 9, 2016 · 11 comments

Comments

@koenlek
Copy link

koenlek commented Apr 9, 2016

For our company, I want to migrate our main shared folder from an old employees account to a generic admin account. To do so, I first created the admin account (called own-admin) and then ran the transfer-ownership command. At the Restoring shares ... stage, I got this error [OCP\Files\NotFoundException], after which the script exited. If I log into own-admin, the files are there, but I cannot share them (it keeps spinning endlessly, I waited for more than half an hour, without luck...). I can create a shared link however. The folder is 30GB. If I create a new folder with own-admin, I can share that with other users and groups without any issues.

I think the significant part might be that the own-admin user had never been logged in. That might be the cause of this bug.

Hopefully a bugfix can be made based on this report. But for now, I would very much be interested to hear of a fix for my current situation? Or will I need to revert to my backups?

Steps to reproduce

  1. Create a new user (e.g. own-admin) from the "users" web interface
  2. Run sudo -u www-data php occ files:transfer-ownership <old_user> own-admin
  3. It will fail on sharing.
  4. Log in to owncloud via webinterface as own-admin.
  5. Try to share via webinterface: wheel keeps spinning. On refresh of page it shows that it is till unshared. If I try to create a shared link it works. But sharing to users/groups fails.
  6. Creating a new folder and share that to groups/users succeeds.

Expected behaviour

The folder should appear at the own-admin user, and should be shared with our main company group.

Actual behaviour

The transfer script fails at the Restoring shares ... stage. Also, I cannot manually share the transferred files via the web interface.

Server configuration

Operating system:
Ubuntu 14.04, 64 bit server, running latest updates

Web server:
nginx 1.4.6

Database:
mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3

PHP version:
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

ownCloud version: (see ownCloud admin page)
9.0.1

Updated from an older ownCloud or fresh install:
Updated from 8.2.2 today

Where did you install ownCloud from:
apt repositories: http://download.owncloud.org/download/repositories/stable/xUbuntu_14.04/
package version 9.0.1-1.1

Signing status (ownCloud 9.0 and above):
no signing issues

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:
Enabled:

  • activity: 2.2.1
  • calendar: 1.0
  • comments: 0.2
  • dav: 0.1.6
  • federatedfilesharing: 0.1.0
  • federation: 0.0.4
  • files: 1.4.4
  • files_pdfviewer: 0.8
  • files_sharing: 0.9.1
  • files_texteditor: 2.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 14.5.0
  • impersonate: 0.0.3
  • notifications: 0.2.3
  • provisioning_api: 0.4.1
  • systemtags: 0.2
  • templateeditor: 0.1
  • updatenotification: 0.1.0
    Disabled:
  • documents
  • encryption
  • external
  • files_external
  • files_locking
  • updater
  • user_external
  • user_ldap
  • user_webdavauth
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

The content of config/config.php:

<?php $CONFIG = array ( 'instanceid' => 'ocv3s875c41t',
'passwordsalt'=> 'X',
'secret'=> 'X',
'trusted_domains'=> array ( 0 => 'owncloud.X.com',
1=> 'X.X.X.X',
2=> 'owncloud.X.com',
),
'datadirectory'=> '/var/www/owncloud/data',
'overwrite.cli.url'=> 'http://owncloud.X.com',
'dbtype'=> 'mysql',
'version'=> '9.0.1.3',
'dbname'=> 'owncloud',
'dbhost'=> 'localhost',
'dbtableprefix'=> 'oc_',
'dbuser'=> 'X',
'dbpassword'=> 'X',
'logtimezone'=> 'UTC',
'installed'=> true,
'theme'=> '',
'maintenance'=> false,
'mail_smtpmode'=> 'smtp',
'mail_smtpsecure'=> 'tls',
'mail_from_address'=> 'X',
'mail_domain'=> 'X',
'mail_smtpauthtype'=> 'LOGIN',
'mail_smtpauth'=> 1,
'mail_smtphost'=> 'X',
'mail_smtpport'=> '587',
'mail_smtpname'=> 'X',
'mail_smtppassword'=> 'X',
'loglevel'=> 2,
'trashbin_retention_obligation'=> 'auto',
'updatechecker'=> false,
'singleuser'=> true,
'appstore.experimental.enabled'=> true,
'memcache.local'=> '\OC\Memcache\APCu',
); 

Are you using external storage,
if yes which one:
local/smb/sftp/... No

Are you using encryption: yes/no no **Are you using an external user-backend,

if yes which one:
** LDAP/ActiveDirectory/Webdav/... no

Client configuration

Browser:
Firefox 45.0.1

Operating system:

Ubuntu 14.04 64bit desktop

Logs

Web server error log

Not relevant?

ownCloud log (data/owncloud.log) Only irrelevant lines?

{"reqId":"Em/9BweqbMMeAYNs3V3C","remoteAddr":"X.X.X.X","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 System in single user mode.","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"
#0 [internal function]: OCA\DAV\Connector\Sabre\MaintenancePlugin->checkMaintenanceMode(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#1 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit('beforeMethod', Array)
#3 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()
#5 /var/www/owncloud/remote.php(138): require_once('/var/www/ownclo...')
#6 {main}","File":"/var/www/owncloud/apps/dav/lib/connector/sabre/maintenanceplugin.php","Line":81,"User":"X"}","level":4,"time":"2016-04-09T18:57:55+00:00","method":"PROPFIND","url":"/remote.php/webdav/","user":"X"} 
{"reqId":"zw3DDqyEs2l18faEvZGA","remoteAddr":"X.X.X.X","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 System in single user mode.","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"
#0 [internal function]: OCA\DAV\Connector\Sabre\MaintenancePlugin->checkMaintenanceMode(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#1 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit('beforeMethod', Array)
#3 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()
#5 /var/www/owncloud/remote.php(138): require_once('/var/www/ownclo...')
#6 {main}","File":"/var/www/owncloud/apps/dav/lib/connector/sabre/maintenanceplugin.php","Line":81,"User":"X"}","level":4,"time":"2016-04-09T18:58:25+00:00","method":"PROPFIND","url":"/remote.php/webdav/","user":"X"} 
{"reqId":"XDJokGtbeNwr/aUlNmak","remoteAddr":"X.X.X.X","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 System in single user mode.","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"
#0 [internal function]: OCA\DAV\Connector\Sabre\MaintenancePlugin->checkMaintenanceMode(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#1 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit('beforeMethod', Array)
#3 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()
#5 /var/www/owncloud/remote.php(138): require_once('/var/www/ownclo...')
#6 {main}","File":"/var/www/owncloud/apps/dav/lib/connector/sabre/maintenanceplugin.php","Line":81,"User":"X"}","level":4,"time":"2016-04-09T18:58:55+00:00","method":"PROPFIND","url":"/remote.php/webdav/","user":"X"} 
{"reqId":"2jY2F6J2t/Q7bweT1s9V","remoteAddr":"X.X.X.X","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 System in single user mode.","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"
#0 [internal function]: OCA\DAV\Connector\Sabre\MaintenancePlugin->checkMaintenanceMode(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#1 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit('beforeMethod', Array)
#3 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()
#5 /var/www/owncloud/remote.php(138): require_once('/var/www/ownclo...')
#6 {main}","File":"/var/www/owncloud/apps/dav/lib/connector/sabre/maintenanceplugin.php","Line":81,"User":"X"}","level":4,"time":"2016-04-09T18:59:25+00:00","method":"PROPFIND","url":"/remote.php/webdav/","user":"X"} 
{"reqId":"UM7FRQrx3DXhRz0eRu4P","remoteAddr":"X.X.X.X","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 System in single user mode.","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"
#0 [internal function]: OCA\DAV\Connector\Sabre\MaintenancePlugin->checkMaintenanceMode(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#1 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit('beforeMethod', Array)
#3 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()
#5 /var/www/owncloud/remote.php(138): require_once('/var/www/ownclo...')
#6 {main}","File":"/var/www/owncloud/apps/dav/lib/connector/sabre/maintenanceplugin.php","Line":81,"User":"X"}","level":4,"time":"2016-04-09T18:59:55+00:00","method":"PROPFIND","url":"/remote.php/webdav/","user":"X"} 

Browser log

Seems irrelevant to me...

@DeepDiver1975 DeepDiver1975 added this to the 9.0.2-current-maintenance milestone Apr 9, 2016
@koenlek koenlek changed the title Transfer ownership to a new user that never logged in fails? Transfer file ownership to a new user that never logged in fails? Apr 10, 2016
@ghost ghost modified the milestones: 9.0.3-next-maintenance, 9.0.2-current-maintenance Apr 14, 2016
@PVince81 PVince81 modified the milestones: 9.0.4-next-maintenance, 9.0.3-current-maintenance Jun 2, 2016
@PVince81 PVince81 modified the milestones: 9.0.5, 9.0.4 Jul 18, 2016
@PVince81 PVince81 modified the milestones: 9.0.6, 9.0.5 Sep 21, 2016
@PVince81
Copy link
Contributor

It should be possible to trigger a setupFS / skeleton copy for the new user before starting the transfer

@PVince81 PVince81 modified the milestones: 9.0.7, 9.0.6 Oct 20, 2016
@JKawohl
Copy link
Contributor

JKawohl commented Oct 27, 2016

As some addition: some shares where migrated some not while reproducing: here are the logs:


{"reqId":"KRSXkBo0dDBETpKIQQcv","remoteAddr":"172.18.16.160","app":"files_external","message":"Exception: {"Exception":"Icewind\SMB\Exception\AuthenticationException","Message":"Invalid login","Code":0,"Trace":"
#0 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php(45): Icewind\SMB\Connection->checkConnectionError('session setup f...')
#1 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(379): Icewind\SMB\Connection->read()
#2 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(132): Icewind\SMB\Share->execute('allinfo "\carlo...')
#3 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(199): Icewind\SMB\Share->stat('/carlos')
#4 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(179): OCA\windows_network_drive\lib\WND->connectionTestWithReset()
#5 /var/www/html/911/apps/files_external/lib/config.php(231): OCA\windows_network_drive\lib\WND->test(false, false)
#6 /var/www/html/911/apps/files_external/lib/Controller/StoragesController.php(253): OC_Mount_Config::getBackendStatus('OCA\windows_net...', Array, false, false)
#7 /var/www/html/911/apps/files_external/lib/Controller/UserGlobalStoragesController.php(119): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)
#8 [internal function]: OCA\Files_External\Controller\UserGlobalStoragesController->show(1, false)
#9 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(159): call_user_func_array(Array, Array)
#10 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#11 /var/www/html/911/lib/private/AppFramework/App.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#12 /var/www/html/911/lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('OCA\Files_Exter...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#13 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#14 /var/www/html/911/lib/private/Route/Router.php(280): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#15 /var/www/html/911/lib/base.php(891): OC\Route\Router->match('/apps/files_ext...')
#16 /var/www/html/911/index.php(39): OC::handleRequest()
#17 {main}","File":"/var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php","Line":104}","level":3,"time":"2016-10-27T09:40:31+00:00","method":"GET","url":"/911/index.php/apps/files_external/userglobalstorages/1?testOnly=false","user":"carlos"}
{"reqId":"cxpEpDVWGdvM9QFPlZ67","remoteAddr":"172.18.16.239","app":"core","message":"Exception while scanning storage "wnd::carlos @172.18.16.220//shared//carlos/": Icewind\SMB\Exception\AuthenticationException: Invalid login","level":3,"time":"2016-10-27T09:40:40+00:00","method":"PROPFIND","url":"/911/remote.php/webdav/","user":"carlos"}
{"reqId":"cxpEpDVWGdvM9QFPlZ67","remoteAddr":"172.18.16.239","app":"core","message":"Exception while scanning storage "wnd::carlos @172.18.16.220//shared//carlos/": Icewind\SMB\Exception\AuthenticationException: Invalid login","level":3,"time":"2016-10-27T09:40:40+00:00","method":"PROPFIND","url":"/911/remote.php/webdav/","user":"carlos"}
{"reqId":"V3E1wnYhr02+ImfsGwtu","remoteAddr":"172.18.16.239","app":"files_external","message":"Exception: {"Exception":"Icewind\SMB\Exception\AuthenticationException","Message":"Invalid login","Code":0,"Trace":"
#0 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php(45): Icewind\SMB\Connection->checkConnectionError('session setup f...')
#1 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(379): Icewind\SMB\Connection->read()
#2 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(132): Icewind\SMB\Share->execute('allinfo "\carlo...')
#3 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(199): Icewind\SMB\Share->stat('/carlos')
#4 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(179): OCA\windows_network_drive\lib\WND->connectionTestWithReset()
#5 /var/www/html/911/apps/files_external/lib/config.php(231): OCA\windows_network_drive\lib\WND->test(false, false)
#6 /var/www/html/911/apps/files_external/lib/Controller/StoragesController.php(253): OC_Mount_Config::getBackendStatus('OCA\windows_net...', Array, false, false)
#7 /var/www/html/911/apps/files_external/lib/Controller/UserGlobalStoragesController.php(119): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)
#8 [internal function]: OCA\Files_External\Controller\UserGlobalStoragesController->show(1, false)
#9 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(159): call_user_func_array(Array, Array)
#10 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#11 /var/www/html/911/lib/private/AppFramework/App.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#12 /var/www/html/911/lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('OCA\Files_Exter...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#13 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#14 /var/www/html/911/lib/private/Route/Router.php(280): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#15 /var/www/html/911/lib/base.php(891): OC\Route\Router->match('/apps/files_ext...')
#16 /var/www/html/911/index.php(39): OC::handleRequest()
#17 {main}","File":"/var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php","Line":104}","level":3,"time":"2016-10-27T09:40:40+00:00","method":"GET","url":"/911/index.php/apps/files_external/userglobalstorages/1?testOnly=false","user":"carlos"}
{"reqId":"34/cgrSckSzF7pv92hq4","remoteAddr":"172.18.16.160","app":"files_external","message":"Exception: {"Exception":"Icewind\SMB\Exception\AuthenticationException","Message":"Invalid login","Code":0,"Trace":"
#0 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php(45): Icewind\SMB\Connection->checkConnectionError('session setup f...')
#1 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(379): Icewind\SMB\Connection->read()
#2 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(132): Icewind\SMB\Share->execute('allinfo "\carlo...')
#3 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(199): Icewind\SMB\Share->stat('/carlos')
#4 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(179): OCA\windows_network_drive\lib\WND->connectionTestWithReset()
#5 /var/www/html/911/apps/files_external/lib/config.php(231): OCA\windows_network_drive\lib\WND->test(false, false)
#6 /var/www/html/911/apps/files_external/lib/Controller/StoragesController.php(253): OC_Mount_Config::getBackendStatus('OCA\windows_net...', Array, false, false)
#7 /var/www/html/911/apps/files_external/lib/Controller/UserGlobalStoragesController.php(119): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)
#8 [internal function]: OCA\Files_External\Controller\UserGlobalStoragesController->show(1, false)
#9 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(159): call_user_func_array(Array, Array)
#10 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#11 /var/www/html/911/lib/private/AppFramework/App.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#12 /var/www/html/911/lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('OCA\Files_Exter...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#13 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#14 /var/www/html/911/lib/private/Route/Router.php(280): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#15 /var/www/html/911/lib/base.php(891): OC\Route\Router->match('/apps/files_ext...')
#16 /var/www/html/911/index.php(39): OC::handleRequest()
#17 {main}","File":"/var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php","Line":104}","level":3,"time":"2016-10-27T09:46:30+00:00","method":"GET","url":"/911/index.php/apps/files_external/userglobalstorages/1?testOnly=false","user":"carlos"}
{"reqId":"FD/VNuYZY+C8IugLienC","remoteAddr":"172.18.16.160","app":"files_external","message":"Exception: {"Exception":"Icewind\SMB\Exception\AuthenticationException","Message":"Invalid login","Code":0,"Trace":"
#0 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php(45): Icewind\SMB\Connection->checkConnectionError('session setup f...')
#1 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(379): Icewind\SMB\Connection->read()
#2 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(132): Icewind\SMB\Share->execute('allinfo "\carlo...')
#3 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(199): Icewind\SMB\Share->stat('/carlos')
#4 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(179): OCA\windows_network_drive\lib\WND->connectionTestWithReset()
#5 /var/www/html/911/apps/files_external/lib/config.php(231): OCA\windows_network_drive\lib\WND->test(false, false)
#6 /var/www/html/911/apps/files_external/lib/Controller/StoragesController.php(253): OC_Mount_Config::getBackendStatus('OCA\windows_net...', Array, false, false)
#7 /var/www/html/911/apps/files_external/lib/Controller/UserGlobalStoragesController.php(119): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)
#8 [internal function]: OCA\Files_External\Controller\UserGlobalStoragesController->show(1, false)
#9 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(159): call_user_func_array(Array, Array)
#10 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#11 /var/www/html/911/lib/private/AppFramework/App.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#12 /var/www/html/911/lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('OCA\Files_Exter...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#13 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#14 /var/www/html/911/lib/private/Route/Router.php(280): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#15 /var/www/html/911/lib/base.php(891): OC\Route\Router->match('/apps/files_ext...')
#16 /var/www/html/911/index.php(39): OC::handleRequest()
#17 {main}","File":"/var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php","Line":104}","level":3,"time":"2016-10-27T09:51:57+00:00","method":"GET","url":"/911/index.php/apps/files_external/userglobalstorages/1?testOnly=false","user":"carlos"}
{"reqId":"FbZojFIb2o4TDGTkwXjE","remoteAddr":"172.18.16.160","app":"files_external","message":"Exception: {"Exception":"Icewind\SMB\Exception\AuthenticationException","Message":"Invalid login","Code":0,"Trace":"
#0 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php(45): Icewind\SMB\Connection->checkConnectionError('session setup f...')
#1 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(379): Icewind\SMB\Connection->read()
#2 /var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Share.php(132): Icewind\SMB\Share->execute('allinfo "\carlo...')
#3 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(199): Icewind\SMB\Share->stat('/carlos')
#4 /var/www/html/911/apps/windows_network_drive/lib/wnd.php(179): OCA\windows_network_drive\lib\WND->connectionTestWithReset()
#5 /var/www/html/911/apps/files_external/lib/config.php(231): OCA\windows_network_drive\lib\WND->test(false, false)
#6 /var/www/html/911/apps/files_external/lib/Controller/StoragesController.php(253): OC_Mount_Config::getBackendStatus('OCA\windows_net...', Array, false, false)
#7 /var/www/html/911/apps/files_external/lib/Controller/UserGlobalStoragesController.php(119): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)
#8 [internal function]: OCA\Files_External\Controller\UserGlobalStoragesController->show(1, false)
#9 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(159): call_user_func_array(Array, Array)
#10 /var/www/html/911/lib/private/AppFramework/Http/Dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#11 /var/www/html/911/lib/private/AppFramework/App.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
#12 /var/www/html/911/lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('OCA\Files_Exter...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#13 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#14 /var/www/html/911/lib/private/Route/Router.php(280): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#15 /var/www/html/911/lib/base.php(891): OC\Route\Router->match('/apps/files_ext...')
#16 /var/www/html/911/index.php(39): OC::handleRequest()
#17 {main}","File":"/var/www/html/911/apps/files_external/3rdparty/icewind/smb/src/Connection.php","Line":104}","level":3,"time":"2016-10-27T09:52:50+00:00","method":"GET","url":"/911/index.php/apps/files_external/userglobalstorages/1?testOnly=false","user":"carlos"}

00006434

@cdamken
Copy link
Contributor

cdamken commented Nov 2, 2016

@koenlek @kawohl I correct your original logs

@PVince81 @mrow4a Could you help us with this problem.

I want to transfer the information with LDAP and AWS S3 and I don't want just to test if it works.

@PVince81
Copy link
Contributor

PVince81 commented Nov 2, 2016

Invalid login to SMB ? Looks like that user has a broken storage and that might be impairing the ownership transfer.

But the original issue had no external storage components.

So there are two issues to look into:

  1. no external storage, transfer files to user who never logged in
  2. same as 1) but with an external storage that was configured to use the user's password. As we know when running CLI tools it is not possible to use the user's password for mounting ext storages. But in this specific situation we should gracefully ignore these mounts.

@PVince81
Copy link
Contributor

PVince81 commented Nov 2, 2016

I did a test for 2) but am not getting the same results: #26530
But it is still indeed an issue.

@PVince81
Copy link
Contributor

PVince81 commented Nov 2, 2016

My steps on v9.0.5 for the original issue:

  1. Create a user "user1" in the web UI and upload some files
  2. Create another user "user2" on the CLI with occ user:add user2 and set a password. This would not setup the FS for that user
  3. Run transfer ownership

In this case it works fine.

Now let's try with LDAP:

  1. Disable avatars to avoid auto-creation of home storages
  2. Setup LDAP users
  3. Login with "zombie400"
  4. Upload a few files
  5. Transfer ownership from "zombie400" to "zombie300" (the latter has never logged in)

=> also works for me with OC 9.0.5.

@koenlek can you also retry with this version ?

@kawohl @cdamken would be good if it would be possible to eliminate the external storage factor from your case. Depending how the external storage is defined it might be possible to prevent both the source and target user to have access to the external storage (for example only apply the storage to specific groups and do not put these users in the groups). I'm also open to explore the external storage issue in a separate ticket if we can have more details about how those are setup and for which user.

@PVince81
Copy link
Contributor

PVince81 commented Nov 2, 2016

@kawohl @cdamken the logs from #23881 (comment) do not contain anything connected to TransferOwnership so the errors you saw are not related. What is the output of the command when it fails ?
Seeing that the logs mention WND I suspect that one of the users (source or target) of the transfer also has access to a WND storage with unsaved credentails (login in session or so).

@PVince81
Copy link
Contributor

PVince81 commented Nov 2, 2016

@kawohl @cdamken had a quick local test with WND and when the WND is accesible for the user (with "username and password" auth mode) the transfer works fine.
In cases where using other auth modes like "User provided" I get similar results like #26530

@PVince81
Copy link
Contributor

Please try again with 9.1.3 RC1 or 9.0.7 RC1, many issues related to transfer ownership were fixed there including the one with ext storages.

@PVince81
Copy link
Contributor

if the problem persists, please reopen

@lock
Copy link

lock bot commented Aug 3, 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 3, 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

6 participants