nextcloud / server

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

External Storage with S3 - commonPrefix ignored if no empty file present #17796

Closed wodka closed 4 years ago

wodka commented 4 years ago

Steps to reproduce

  1. create external storage
  2. push S3 file to a/b.txt (important to not click "create folder" first!)

-> this way the root S3 will show the commonPrefix "a". At the same time there will not be an empty file for Folder

Expected behaviour

See the dir "a"

Actual behaviour

"a" is not visible, by clicking "create folder" the file appears as well!

Server configuration

Operating system: docker

Web server: docker

Database: mysql

PHP version: 7.3.11

Nextcloud version: 17.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Fresh Install

Where did you install Nextcloud from: Docker

Signing status:

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

List of activated apps:

App list ``` Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - admin_audit: 1.7.0 - bruteforcesettings: 1.4.0 - calendar: 1.7.1 - cloud_federation_api: 1.0.0 - comments: 1.7.0 - dav: 1.13.0 - deck: 0.7.0 - federatedfilesharing: 1.7.0 - federation: 1.7.0 - files: 1.12.0 - files_external: 1.8.0 - files_frommail: 0.3.0 - files_fulltextsearch_tesseract: 1.3.1 - 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 - nextcloud_announcements: 1.6.0 - notifications: 2.5.0 - oauth2: 1.5.0 - password_policy: 1.7.0 - piwik: 0.5.3 - privacy: 1.1.0 - provisioning_api: 1.7.0 - rainloop: 6.0.4 - 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 - tasks: 0.11.3 - text: 1.1.0 - theming: 1.8.0 - twofactor_backupcodes: 1.6.0 - updatenotification: 1.7.0 - user_external: 0.7.0 - user_ldap: 1.7.0 - viewer: 1.1.0 - workflowengine: 1.7.0 Disabled: - carnet - encryption - mail ```

Nextcloud configuration:

Config report ``` { "system": { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "17.0.0.9", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "smtp", "mail_smtpsecure": "ssl", "mail_sendmailmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "theme": "", "loglevel": 0, "has_rebuilt_cache": true, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory" } } ```

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

Are you using encryption: no

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

Client configuration

Browser: Chrome / FF / Safari (does not matter)

Operating system: Ubuntu 1804 / OSX

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"hsYWVj9gavSsZo2PnYxL","level":0,"time":"2019-11-04T10:20:30+00:00","remoteAddr":"10.0.102.77","user":"---","app":"OC\\Files\\Cache\\Scanner","method":"GET","url":"\/apps\/recommendations\/api\/recommendations","message":"!!! Path 'a\/b.txt' is not accessible or present !!!","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.70 Safari\/537.36","version":"17.0.0.9"} ```
kesselb commented 4 years ago

Could this be fixed by https://github.com/nextcloud/server/pull/14913? It will be part of Nextcloud 17.0.1.

wodka commented 4 years ago

this sounds exactly like this problem - I will check once the version is out

kesselb commented 4 years ago

@wodka :ping_pong:

wodka commented 4 years ago

checked and this is working now! Thank you