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

filesystem_check_changes option not working as expected on shared folders, in Nextcloud 20 #24287

Closed
qmaxquique opened this issue Nov 22, 2020 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@qmaxquique
Copy link

Hello,
I've noticed that the option filesystem_check_changes=1 is not having the same behavior as in the previous version when using a shared folder.

Please consider the following scenario:

  • In the server config, filesystem_check_changes=1
  • There are 2 users in a server, John, and Jane.
  • John shares the folder with Jane.
  • There is a change outside Nextcloud, a new file in the shared folder.
  • Log as Jane, access the folder and you will find it empty. [while expecting to see a new file]
  • Then log as John (shared folder owner) and you will find the new file there. (expected behavior)
  • Again as Jane, go to the shared folder and the new file will appear.

It looks like, unlike in the previous version, the filesystem_check_changes is only working for user-owned folders, while in previous versions it was also triggering the updates in shared folders as well.

Thank you!

Steps to reproduce

  1. Configure your installation with the option 'filesystem_check_changes' => 1
  2. Create 2 new users
  3. With user1, share a folder to user2
  4. Add or delete a new file in the shared folder, outside Nextcloud
  5. Check with user2 the contents of the shared folder - The changes will not be reflected.
  6. Navigate/refresh the shared folder again, with user1 - The changes will be synchronized.
  7. Check again the folder with user2 - The changes will be there, as expected.

Expected behaviour

As in previous versions, with the option filesystem_check_changes set to 1, any user accessing any folder (even owned by other users) should make Nextcloud check for filesystems changes.

Actual behaviour

The filesystem_check_changes seem to apply only to folders owned by the current user.

Server configuration

Operating system:
CentOS, using the latest Nextcloud Docker image ID c664af0d9c67

Web server:
Apache 2.4

Database:
MariaDB 10.5.5

PHP version:
Version: 7.4.12

Nextcloud version: (see Nextcloud admin page)
20.0.2

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

Where did you install Nextcloud from:
Latest docker image. https://hub.docker.com/_/nextcloud

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.6.0
  - analytics: 3.0.0
  - bruteforcesettings: 2.0.1
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contactsinteraction: 1.1.0
  - dav: 1.16.1
  - external: 3.7.1
  - federatedfilesharing: 1.10.1
  - files: 1.15.0
  - files_external: 1.11.1
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.0
  - files_trackdownloads: 1.9.0
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - hsts: 0.7.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - notes: 4.0.0
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - password_policy: 1.10.1
  - photos: 1.2.0
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - recommendations: 0.8.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - sociallogin: 3.4.2
  - support: 1.3.0
  - systemtags: 1.10.0
  - text: 3.1.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0
Disabled:
  - activity
  - admin_audit
  - camerarawpreviews
  - dashboard
  - encryption
  - federation
  - firstrunwizard
  - nextcloud_announcements
  - survey_client
  - user_ldap

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***",
        "filesystem_check_changes": 1,
        "filesystem_cache_readonly": false,
        "enable_previews": true,
        "trusted_domains": [
            "cloud.hdmz.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.2.2",
        "overwrite.cli.url": "https:\/\/cloud.hdmz.com",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "2525",
        "mail_smtpauth": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "loglevel": 0,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "app_install_overwrite": [
            "external"
        ]
    }
}

**Are you using external storage, if yes which one: sftp

Are you using encryption: no

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

LDAP configuration (delete this part if not used)

LDAP config
No LDAP in use

Client configuration

Browser:

  • Google Chrome

Operating system:
MacOS 10.15.7

Logs

Web server error log

Web server error log
...
<MASKED> - - [22/Nov/2020:14:17:23 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 272 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
<MASKED> - - [22/Nov/2020:14:17:28 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 272 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
<MASKED> - google-<MASKED> [22/Nov/2020:14:17:29 +0000] "PROPFIND /remote.php/dav/files/google-<MASKED>/ HTTP/1.1" 207 1113 "-" "Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)"
<MASKED> - google-<MASKED> [22/Nov/2020:14:17:31 +0000] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1" 304 274 "-" "Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)"
<MASKED> - - [22/Nov/2020:14:17:42 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 272 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
35.191.8.4 - google-<MASKED> [22/Nov/2020:14:17:55 +0000] "PROPFIND /remote.php/dav/files/google-<MASKED>/ HTTP/1.1" 207 1110 "-" "Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)"

Nextcloud log (data/nextcloud.log)

Nextcloud log
...
{"reqId":"gKs243baNCCy6wxraGu9","level":0,"time":"2020-11-22T14:15:11+00:00","remoteAddr":"<MASKED>","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"OC_App::registerLogIn() is deprecated, please register your alternative login option using the registerAlternativeLogin() on the RegistrationContext in your Application class implementing the OCP\\Authentication\\IAlternativeLogin interface","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36","version":"20.0.2.2"}
{"reqId":"YBZen8UiO6I9DBKDDQG7","level":0,"time":"2020-11-22T14:15:11+00:00","remoteAddr":"<MASKED>","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"OC_App::registerLogIn() is deprecated, please register your alternative login option using the registerAlternativeLogin() on the RegistrationContext in your Application class implementing the OCP\\Authentication\\IAlternativeLogin interface","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36","version":"20.0.2.2"}

Browser log

Browser log
Empty logs
@rgl1234
Copy link

rgl1234 commented Feb 7, 2021

same problem here #23988

@ghost
Copy link

ghost commented Mar 25, 2021

I see this issue in Nextcloud 21.0.0 as well as in 20.0.8. Refresh fails as soon as an external storage is shared with another user.

@musicjunk
Copy link

musicjunk commented Jun 28, 2021

Found a solution. I'm using version 21.0.2. I've had today the same problem. I've copied data on webserver from old to new nextcloud-installation with file-copy and not in nextcloud GUI and nothing was shown in my shared-folder. So if you rename after that the shared folder, it will be updated and all files are visible. After that you can rename it again.

@szaimen
Copy link
Contributor

szaimen commented Aug 8, 2021

Lets track this in #23988

@szaimen szaimen closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

4 participants