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

[Bug]: Nextcloud not resolving directory with name "0" and instead trying to reference subdirectory directly. #49987

Open
5 of 8 tasks
surfrock66 opened this issue Dec 29, 2024 · 5 comments
Assignees

Comments

@surfrock66
Copy link

surfrock66 commented Dec 29, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

I have a fileserver share mounted to my nextcloud server as an external storage at "/mnt/fileserver" mapped as an external storage to "/mnt/fileserver/surfrock66/Videos/TV". Inside here is a directory for each alphabet letter, and "0" (zero) for shows with numbers I have ripped from Blu-Ray. This works generally well, except for the folder "0". I am getting spammed multiple times a minute with the following log entry:

{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:30+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:30+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:30+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:30+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:30+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:33+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:33+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:33+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:33+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:31:34+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}

This folder does not exist like this; it is nested inside the "0" folder, but nextcloud appears to be skipping the 0 folder:

root@sr66-nxt-01:~# ls /mnt/fileserver/surfrock66/Videos/TV/0/
total 4.0K
4.0K drwxrwxr-x 6 surfrock66 family 4.0K Dec 23 20:09 24

The other subfolders which are named with alphabet letters are fine and do not exhibit this behavior, it appears to be something specific to the "0" folder.

Steps to reproduce

  1. Mount an NFS share at "/mnt/fileserver"
  2. Add an external storage of type "Local" to "/mnt/fileserver/somesubfolder"
  3. Create a directory in that folder titled "0"
  4. Create additional directories in the "0" directory
  5. Monitor nextcloud.log where cron will spam errors resolving the subdirectories directly off the path multiple times a second.

Expected behavior

The folder is mounted and shows up correctly

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

root@sr66-nxt-01:~# sudo -u www-data php /var/www/nextcloud/occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "defaultapp": "files",
        "version": "30.0.4.1",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "maintenance": false,
        "theme": "",
        "localstorage.umask": 2,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "default_phone_region": "US",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "app_install_overwrite": [],
        "trashbin_retention_obligation": "auto,15",
        "allow_local_remote_servers": true,
        "mail_smtpsecure": "ssl",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "timeout": 1.5
        },
        "enforce_theme": "",
        "updater.release.channel": "stable",
        "maintenance_window_start": 9
    }
}

List of activated Apps

root@sr66-nxt-01:~# sudo -u www-data php /var/www/nextcloud/occ app:list
Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - app_api: 4.0.3
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.8
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.2
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_3dmodelviewer: 0.0.15
  - files_downloadlimit: 3.0.0
  - files_external: 1.22.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - mail: 4.1.1
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.3
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - spreed: 20.1.1
  - support: 2.0.0
  - survey_client: 2.0.0
  - suspicious_login: 8.0.0
  - systemtags: 1.20.0
  - tables: 0.8.2
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - theming_customcss: 1.17.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_ldap: 1.21.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - encryption: 2.18.0 (installed 2.10.0)
  - epubviewer: 1.6.7 (installed 1.6.3)
  - files_texteditor: 2.15.1 (installed 2.15.1)
  - ldap_write_support: 1.12.0 (installed 1.12.0)
  - printer: 0.0.5 (installed 0.0.5)
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

root@sr66-nxt-01:~# tail -n 20 /var/log/nextcloud/nextcloud.log
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:46+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:46+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:46+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:46+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:48+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:48+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:48+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:48+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}
{"reqId":"H0MyrLgUiMeJ0GdlYLfK","level":3,"time":"2024-12-29T04:40:48+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"opendir(/mnt/fileserver/surfrock66/Videos/TV/24): Failed to open directory
: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#129","userAgent":"--","version":"30.0.4.1","data":{"app":"PHP"}}

Additional info

No response

@surfrock66 surfrock66 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 29, 2024
@joshtrichards
Copy link
Member

joshtrichards commented Dec 29, 2024

Upgraded to a MAJOR version (ex. 28 to 29)

Just to clarify: this worked fine on v29 but broke when you upgraded this environment to v30? Or when you upgraded to v30.0.4 from ???

Do you see the same behavior if you mount a non-NFS Local mount (e.g. /tmp/foobar) and create a 0 folder within it?

@joshtrichards joshtrichards added feature: external storage 30-feedback hotspot: filename handling Filenames - invalid, portable, blacklisting, etc. labels Dec 29, 2024
@surfrock66
Copy link
Author

I guess I am not actually sure because I created the folder right after upgrading. The timing was pretty close to each other.

@joshtrichards
Copy link
Member

🤦 Reproduced. Ouch!

This code has been in place for many years. I can't believe it's not been noted until now. I want to do some digging before pushing formally. Also want to review the current test coverage. That'll have to wait until tomorrow at the earliest.

If you want to test the fix in your environment, change line 498 of lib/private/Files/Cache/Scanner.php from:

$child = $path ? $path . '/' . $file : $file;

to:

			$child = isset($path) ? $path . '/' . $file : $file;

@joshtrichards joshtrichards self-assigned this Dec 30, 2024
@joshtrichards joshtrichards added 2. developing Work in progress and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 30, 2024
@surfrock66
Copy link
Author

Applied the fix, rebooted, and the message appears to be gone, however when I browse to the "0" folder I still see no subfolders. This may just take some time, I'll check again in the morning.

@surfrock66
Copy link
Author

Overnight the contents of the directory showed up, I think that fix works.

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

No branches or pull requests

2 participants