nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.31k stars 4.06k forks source link

External storage can not remove folders with ' in name from right-click menu #17871

Closed kozmikyak closed 4 years ago

kozmikyak commented 4 years ago

It appears that folders with ' in their name can not be deleted from the right-click dropdown on external storage of NFS and CIFS/SMB variety. I've tried CIFS/SMB and an NFS mounted "local" filesystem with the all_squash anonguid and anonuid set to 33 (www-data), and I've verified that the local www-data user and group can delete the folders in question. I suspect some issue with escaping the filenames from some shell call to the rm command.

I'm not sure what other file operations might fail on such filenames.

Steps to reproduce

  1. Create a folder with ' in its name, on an external storage folder backed by SMB/CIFS or "local", from the GUI.
  2. Attempt to delete it in the GUI.
  3. Note that it returns to the GUI without any action, even after waiting about 3 minutes

Expected behaviour

The folder should be removed as it is when using the top-of-the-list bulk action dropdown, or the three dots to the right of the item.

Actual behaviour

The GUI returns to the user with no sign any operation has happened/is supposed to happen.

Server configuration

Operating system:

Ubuntu 19.10 VirtualBox VM

Web server:

Apache 2.4.41

Database:

MariaDB 10.1

PHP version:

PHP 7.3.11

Nextcloud version: (see Nextcloud admin page)

17.0.0 (just saw that there's an updated version, will apply update now and recheck the behavior)

Updated from an older Nextcloud/ownCloud or fresh install:

updated

Where did you install Nextcloud from:

Source tarball

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - cloud_federation_api: 1.0.0 - comments: 1.7.0 - dav: 1.13.0 - federatedfilesharing: 1.7.0 - federation: 1.7.0 - files: 1.12.0 - files_external: 1.8.0 - files_pdfviewer: 1.6.0 - files_rightclick: 0.15.1 - files_sharing: 1.9.0 - files_trashbin: 1.7.0 - files_versions: 1.10.0 - files_videoplayer: 1.6.0 - firstrunwizard: 2.6.0 - gallery: 18.4.0 - logreader: 2.2.0 - lookup_server_connector: 1.5.0 - music: 0.11.0 - nextcloud_announcements: 1.6.0 - notifications: 2.5.0 - oauth2: 1.5.0 - password_policy: 1.7.0 - privacy: 1.1.0 - provisioning_api: 1.7.0 - recommendations: 0.5.0 - serverinfo: 1.7.0 - sharebymail: 1.7.0 - support: 1.0.1 - survey_client: 1.5.0 - systemtags: 1.7.0 - text: 1.1.0 - theming: 1.8.0 - twofactor_backupcodes: 1.6.0 - updatenotification: 1.7.0 - viewer: 1.1.0 - workflowengine: 1.7.0 Disabled: - admin_audit - bruteforcesettings - encryption - files_texteditor - user_ldap ```

Nextcloud configuration:

Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "files.cellowizard.info" ], "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwritehost": "files.cellowizard.info", "overwrite.cli.url": "https:\/\/files.cellowizard.info", "dbtype": "mysql", "version": "17.0.0.9", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "maintenance": false, "loglevel": 2, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "ssl", "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "theme": "", "memcache.local": "\\OC\\Memcache\\APCu", "updater.release.channel": "stable", "mysql.utf8mb4": true, "forcessl": true, "forceSSLforSubdomains": true, "overwriteprotocol": "https", "app_install_overwrite": [ "files_external_gdrive", "files_external_dropbox" ] } } ```

Are you using external storage, if yes which one: NFS mount as local, sometimes SMB/CIFS

Are you using encryption: no

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

Client configuration

Browser: Firefox 70.0.1

Operating system: MacOS 10.14.6

Logs

Web server error log

Web server error log ``` [Fri Nov 08 13:35:56.894705 2019] [authz_core:error] [pid 17287] [client 10.2.10.1:45620] AH01630: client denied by server configuration: /var/www/files.yak.org.lan/config [Fri Nov 08 17:14:55.281771 2019] [authz_core:error] [pid 17248] [client 10.2.10.1:48006] AH01630: client denied by server configuration: /var/www/files.yak.org.lan/config ```

Nextcloud log (data/nextcloud.log)

Nextcloud log [owncloud-log.txt](https://github.com/nextcloud/server/files/3826198/owncloud-log.txt) #### Browser log
Browser log ``` Insert your browser log here, this could for example include: Console log: 14:41:59.582 JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js:2:551 14:41:59.721 oc_config is deprecated: use OC.config instead globals.js:26:15 14:41:59.796 oc_requesttoken is deprecated: use OC.requestToken instead 2 globals.js:26:15 14:41:59.844 OCA.Viewer initialized Viewer.js:37:10 14:41:59.887 New search handler registered search.js:67:12 14:41:59.936 The escapeHTML library is deprecated! It will be removed in nextcloud 19. 2 globals.js:26:15 14:41:59.981 The select2 library is deprecated! It will be removed in nextcloud 19. 2 globals.js:26:15 14:42:00.579 The humanFileSize library is deprecated! It will be removed in nextcloud 19. 16 globals.js:26:15 14:42:00.770 The escapeHTML library is deprecated! It will be removed in nextcloud 19. 11 globals.js:26:15 14:42:11.032 The humanFileSize library is deprecated! It will be removed in nextcloud 19. 5 globals.js:26:15 14:42:12.543 The select2 library is deprecated! It will be removed in nextcloud 19. 2 globals.js:26:15 14:42:12.765 The humanFileSize library is deprecated! It will be removed in nextcloud 19. 3 globals.js:26:15 14:42:25.812 The select2 library is deprecated! It will be removed in nextcloud 19. 2 globals.js:26:15 14:42:25.903 The escapeHTML library is deprecated! It will be removed in nextcloud 19. 4 globals.js:26:15 14:42:25.919 The select2 library is deprecated! It will be removed in nextcloud 19. globals.js:26:15 ```
kozmikyak commented 4 years ago

Actually, all right click actions fail. I was wrong.