Renaming SMB folder in OwnCloud Deletes Original External Folder from SMB Server #27377

Closed
0x00FE opened this Issue Mar 13, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@0x00FE

0x00FE commented Mar 13, 2017

Steps to reproduce

  1. Setup External Storage (SMB/CIFS) (Make sure it's an empty directory so you won't lose your data)
  2. Login to OwnCloud as the user with permissions.
  3. Rename the "SMB" folder to anything else.

Expected behaviour

The SMB folder will be renamed to a new name retaining the original folder and links in the system.

Actual behaviour

The actual folder on the SAMBA server is deleted and data is lost to all users of that folder.

Server configuration

Operating system:Ubuntu 16.04 LTS

Web server: Apache2

Database: SQLite

PHP version: 7.0

ownCloud version: 9.1.4 (stable)

Updated from an older ownCloud or fresh install: Fresh

Where did you install ownCloud from: Repository

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.3.2
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.2.7
  - 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
Disabled:
  - encryption
  - external
  - files_antivirus
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "ocqec14yrnm5",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.1.20"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/192.168.1.20\/owncloud",
        "dbtype": "sqlite3",
        "version": "9.1.4.2",
        "logtimezone": "UTC",
        "installed": true
    }
}

Are you using external storage, if yes which one: smb

Are you using encryption: no

Are you using an external user-backend, if yes which one: -

Client configuration

Browser: Chrome

Operating system: Ubuntu 16:04 LTS

Logs

Web server error log

[Mon Mar 13 18:47:20.378174 2017] [authz_core:error] [pid 14955] [client 192.168.1.107:38424] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Mon Mar 13 18:49:36.521319 2017] [authz_core:error] [pid 14922] [client 192.168.1.107:38500] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Mon Mar 13 18:51:54.923138 2017] [authz_core:error] [pid 14952] [client 192.168.1.107:38550] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Mon Mar 13 18:58:30.672519 2017] [:error] [pid 14944] [client 192.168.1.105:34615] script '/var/www/html/status.php' not found or unable to stat
[Mon Mar 13 19:10:35.765197 2017] [authz_core:error] [pid 14954] [client 192.168.1.10:56734] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Mon Mar 13 19:56:35.792686 2017] [authz_core:error] [pid 15109] [client 192.168.1.10:57388] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Mon Mar 13 20:08:19.715292 2017] [authz_core:error] [pid 14985] [client 192.168.1.10:57916] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Mon Mar 13 20:29:56.772062 2017] [authz_core:error] [pid 14985] [client 192.168.1.10:58768] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt

ownCloud log (data/owncloud.log)

{"reqId":"pqHkmu8nunzkuvIyvnLK","remoteAddr":"192.168.1.10","app":"webdav","message":"Exception: {\"Message\":\"Invalid request for smb:\\\/\\\/192.168.1.21\\\/nas\\\/OwnCloud (NotFoundException)\",\"Exception\":\"Icewind\\\\SMB\\\\Exception\\\\NotFoundException\",\"Code\":2,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php(72): Icewind\\\\SMB\\\\NativeState->handleError('smb:\\\/\\\/192.168.1...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php(180): Icewind\\\\SMB\\\\NativeState->testResult(false, 'smb:\\\/\\\/192.168.1...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeShare.php(108): Icewind\\\\SMB\\\\NativeState->stat('smb:\\\/\\\/192.168.1...')\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeShare.php(103): Icewind\\\\SMB\\\\NativeShare->getStat('\\\/OwnCloud')\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(139): Icewind\\\\SMB\\\\NativeShare->stat('\\\/OwnCloud')\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(279): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->getFileInfo('\\\/OwnCloud')\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Common.php(172): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->stat('')\\n#7 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(361): OC\\\\Files\\\\Storage\\\\Common->filemtime('')\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->hasUpdated('', 1489424508)\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(394): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424508)\\n#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->hasUpdated('', 1489424508)\\n#11 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424508)\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Watcher.php(125): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424508)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1301): OC\\\\Files\\\\Cache\\\\Watcher->needsUpdate('', Object(OC\\\\Files\\\\Cache\\\\CacheEntry))\\n#14 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1339): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage), '', 'SMB')\\n#15 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php(157): OC\\\\Files\\\\View->getFileInfo('\\\/xirex\\\/files\\\/SM...')\\n#16 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('SMB')\\n#17 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('SMB', Array, 1)\\n#18 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#19 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#20 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#21 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#22 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#23 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#24 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php\",\"Line\":44,\"User\":\"xirex\"}","level":4,"time":"2017-03-13T17:03:48+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/SMB","user":"xirex"}
{"reqId":"0\/Co72FHFQsWM09AEcZy","remoteAddr":"192.168.1.10","app":"webdav","message":"Exception: {\"Message\":\"Invalid request for smb:\\\/\\\/192.168.1.21\\\/nas\\\/OwnCloud (NotFoundException)\",\"Exception\":\"Icewind\\\\SMB\\\\Exception\\\\NotFoundException\",\"Code\":2,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php(72): Icewind\\\\SMB\\\\NativeState->handleError('smb:\\\/\\\/192.168.1...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php(180): Icewind\\\\SMB\\\\NativeState->testResult(false, 'smb:\\\/\\\/192.168.1...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeShare.php(108): Icewind\\\\SMB\\\\NativeState->stat('smb:\\\/\\\/192.168.1...')\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeShare.php(103): Icewind\\\\SMB\\\\NativeShare->getStat('\\\/OwnCloud')\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(139): Icewind\\\\SMB\\\\NativeShare->stat('\\\/OwnCloud')\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(279): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->getFileInfo('\\\/OwnCloud')\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Common.php(172): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->stat('')\\n#7 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(361): OC\\\\Files\\\\Storage\\\\Common->filemtime('')\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->hasUpdated('', 1489424948)\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(394): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424948)\\n#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->hasUpdated('', 1489424948)\\n#11 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424948)\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Watcher.php(125): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424948)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1301): OC\\\\Files\\\\Cache\\\\Watcher->needsUpdate('', Object(OC\\\\Files\\\\Cache\\\\CacheEntry))\\n#14 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1339): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage), '', '\\\/xirex\\\/files\\\/SM...')\\n#15 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Root.php(180): OC\\\\Files\\\\View->getFileInfo('\\\/xirex\\\/files\\\/SM...')\\n#16 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(117): OC\\\\Files\\\\Node\\\\Root->get('\\\/xirex\\\/files\\\/SM...')\\n#17 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(279): OC\\\\Files\\\\Node\\\\Folder->get('\\\/SMB')\\n#18 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/SystemTag\\\/SystemTagsObjectTypeCollection.php(143): OC\\\\Files\\\\Node\\\\Folder->getById(20)\\n#19 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(105): OCA\\\\DAV\\\\SystemTag\\\\SystemTagsObjectTypeCollection->childExists('20')\\n#20 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAVACL\\\/Plugin.php(730): Sabre\\\\DAV\\\\Tree->nodeExists('systemtags-rela...')\\n#21 [internal function]: Sabre\\\\DAVACL\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#22 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#23 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#24 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#25 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(178): Sabre\\\\DAV\\\\Server->exec()\\n#26 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#27 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#28 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php\",\"Line\":44,\"User\":\"xirex\"}","level":4,"time":"2017-03-13T17:09:54+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/dav\/systemtags-relations\/files\/20","user":"xirex"}
{"reqId":"uy1Qq9zxKm7LZ\/7GiaB\/","remoteAddr":"192.168.1.10","app":"webdav","message":"Exception: {\"Message\":\"Invalid request for smb:\\\/\\\/192.168.1.21\\\/nas\\\/OwnCloud (NotFoundException)\",\"Exception\":\"Icewind\\\\SMB\\\\Exception\\\\NotFoundException\",\"Code\":2,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php(72): Icewind\\\\SMB\\\\NativeState->handleError('smb:\\\/\\\/192.168.1...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php(180): Icewind\\\\SMB\\\\NativeState->testResult(false, 'smb:\\\/\\\/192.168.1...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeShare.php(108): Icewind\\\\SMB\\\\NativeState->stat('smb:\\\/\\\/192.168.1...')\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeShare.php(103): Icewind\\\\SMB\\\\NativeShare->getStat('\\\/OwnCloud')\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(139): Icewind\\\\SMB\\\\NativeShare->stat('\\\/OwnCloud')\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(279): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->getFileInfo('\\\/OwnCloud')\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Common.php(172): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->stat('')\\n#7 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(361): OC\\\\Files\\\\Storage\\\\Common->filemtime('')\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->hasUpdated('', 1489424948)\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(394): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424948)\\n#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->hasUpdated('', 1489424948)\\n#11 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(373): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424948)\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Watcher.php(125): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated('', 1489424948)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1301): OC\\\\Files\\\\Cache\\\\Watcher->needsUpdate('', Object(OC\\\\Files\\\\Cache\\\\CacheEntry))\\n#14 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1339): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage), '', 'SMB')\\n#15 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php(157): OC\\\\Files\\\\View->getFileInfo('\\\/xirex\\\/files\\\/SM...')\\n#16 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('SMB')\\n#17 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('SMB', Array, 1)\\n#18 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#19 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#20 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#21 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#22 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#23 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#24 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/smb\\\/src\\\/NativeState.php\",\"Line\":44,\"User\":\"xirex\"}","level":4,"time":"2017-03-13T17:10:01+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/SMB","user":"xirex"}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@SergioBertolinSG

This comment has been minimized.

Show comment
Hide comment
@SergioBertolinSG

SergioBertolinSG Mar 14, 2017

Member

I can reproduce this using 10.0.0Alpha.

Please note that the rename is in the files view.

Not happening with other external storages (tested using SFTP).

Member

SergioBertolinSG commented Mar 14, 2017

I can reproduce this using 10.0.0Alpha.

Please note that the rename is in the files view.

Not happening with other external storages (tested using SFTP).

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Mar 14, 2017

Member

I'm not really sure what should be the behaviour....

What I see is:

  • if the mount point targets a SMB share and we try to rename it -> 💥 (definitely something to fix).
  • if the mount targets an inner folder the rename is fine but
    • contents are moved from the external storage to the ownCloud server
    • the page needs a manual refresh to show the changes properly
      • new local folder appears with a local folder icon
      • SMB remote folder reappears.
    • the "new" SMB folder cannot connect any longer to the backend

I think the quick fix is to block and prevent the rename operation over the mount point.

If we decide to block the operation, it's possible to "rename" the mount changing the folder name in the mount point configuration.

Expected behaviour
The SMB folder will be renamed to a new name retaining the original folder and links in the system.

I don't think we should go that way:

  • The SMB share can't be renamed in the backend without breaking the share.
  • Changing the name locally per user would require a mapping table per user. I'd expect a performance penalty and a lot of code changes with a huge risk of bugs.
  • Changing the name of the mount shouldn't be possible by any user from there. The mount point name is shared among all the users and the change of any user shouldn't affect the rest.

@PVince81 any other option?

Member

jvillafanez commented Mar 14, 2017

I'm not really sure what should be the behaviour....

What I see is:

  • if the mount point targets a SMB share and we try to rename it -> 💥 (definitely something to fix).
  • if the mount targets an inner folder the rename is fine but
    • contents are moved from the external storage to the ownCloud server
    • the page needs a manual refresh to show the changes properly
      • new local folder appears with a local folder icon
      • SMB remote folder reappears.
    • the "new" SMB folder cannot connect any longer to the backend

I think the quick fix is to block and prevent the rename operation over the mount point.

If we decide to block the operation, it's possible to "rename" the mount changing the folder name in the mount point configuration.

Expected behaviour
The SMB folder will be renamed to a new name retaining the original folder and links in the system.

I don't think we should go that way:

  • The SMB share can't be renamed in the backend without breaking the share.
  • Changing the name locally per user would require a mapping table per user. I'd expect a performance penalty and a lot of code changes with a huge risk of bugs.
  • Changing the name of the mount shouldn't be possible by any user from there. The mount point name is shared among all the users and the change of any user shouldn't affect the rest.

@PVince81 any other option?

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 24, 2017

Member

If we're talking about a system mount, only admins can rename it on the settings page. In this case, it doesn't go through the regular FS APIs, it simply renames it in the configuration.

If we're talking about a personal mount, users are able to rename either in the settings page or through the web UI or Webdav. The Webdav rename is converted to a mount point move which should adjust the configuration. If that is the place causing the issue, then maybe the interception of this rename isn't done properly and might be going through logic that does cross-storage move (move + delete).

I'd be fine preventing users to rename mount points through Webdav if that can solve the issue. However renaming in the settings page should stay possible since it's their mounts.

Member

PVince81 commented Mar 24, 2017

If we're talking about a system mount, only admins can rename it on the settings page. In this case, it doesn't go through the regular FS APIs, it simply renames it in the configuration.

If we're talking about a personal mount, users are able to rename either in the settings page or through the web UI or Webdav. The Webdav rename is converted to a mount point move which should adjust the configuration. If that is the place causing the issue, then maybe the interception of this rename isn't done properly and might be going through logic that does cross-storage move (move + delete).

I'd be fine preventing users to rename mount points through Webdav if that can solve the issue. However renaming in the settings page should stay possible since it's their mounts.

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 29, 2017

Member

Fixed through #27504 by preventing rename on SMB level

Member

PVince81 commented Mar 29, 2017

Fixed through #27504 by preventing rename on SMB level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment