Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Renaming SMB folder in OwnCloud Deletes Original External Folder from SMB Server #27377
Steps to reproduce
The SMB folder will be renamed to a new name retaining the original folder and links in the system.
The actual folder on the SAMBA server is deleted and data is lost to all users of that folder.
Operating system:Ubuntu 16.04 LTS
Web server: Apache2
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):
List of activated apps:
The content of config/config.php:
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: -
Operating system: Ubuntu 16:04 LTS
Web server error log
ownCloud log (data/owncloud.log)
I'm not really sure what should be the behaviour....
What I see is:
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.
I don't think we should go that way:
@PVince81 any other option?
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.