nextcloud / server

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

[Bug]: Truncated "filecache" table, now data is wrongly linked #46147

Open huntervcx opened 2 days ago

huntervcx commented 2 days ago

⚠️ This issue respects the following points: ⚠️

Bug description

Users can open files that are from other shares, even if they don't have an access to with their account Totally random on the files or folders

Tried to truncate oc_filecache multiple times (related to #45238 ), nothing changed

First asumptions would be an error using the fileID used by nextcloud

Steps to reproduce

Pretty random, can be reproductible by truncate oc_filecache multiple times. Files will show wrong thumbnails, or even open other files

Expected behavior

See and open the good file, not access files from others shares that the user doesn't have any access to

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.domain.tld"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.3.4",
        "overwrite.cli.url": "https:\/\/cloud.domain.tld",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpmode": "smtp",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "skeletondirectory": "",
        "templatedirectory": "",
        "mail_smtpsecure": "ssl",
        "default_phone_region": "fr_FR",
        "default_language": "fr",
        "default_locale": "fr_FR",
        "trashbin_retention_obligation": "15,90",
        "knowledgebaseenabled": false,
        "maintenance": false,
        "enable_previews": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "loglevel": 2,
        "maintenance_window_start": 2,
        "activity_use_cached_mountpoints": false,
        "log_type": "file",
        "logfile": "\/mnt\/data\/data\/nextcloud.log",
        "logdateformat": "F d, Y H:i:s",
        "ldapUserCleanupInterval": 60
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - cloud_federation_api: 1.12.0
  - contactsinteraction: 1.10.0
  - dav: 1.30.1
  - external: 5.4.0
  - federatedfilesharing: 1.19.0
  - files: 2.1.0
  - files_antivirus: 5.5.5
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_ldap: 1.20.0
  - user_status: 1.9.0
  - viewer: 2.3.0
  - workflowengine: 2.11.0
Disabled:
  - circles: 29.0.0-dev (installed 25.0.0)
  - comments: 1.19.0 (installed 1.15.0)
  - dashboard: 7.9.0 (installed 7.5.0)
  - encryption: 2.17.0
  - federation: 1.19.0 (installed 1.15.0)
  - files_versions: 1.22.0 (installed 1.22.0)
  - firstrunwizard: 2.18.0 (installed 2.14.0)
  - nextcloud_announcements: 1.18.0 (installed 1.14.0)
  - photos: 2.5.0 (installed 2.0.1)
  - previewgenerator: 5.5.0 (installed 5.5.0)
  - related_resources: 1.4.0 (installed 1.3.0)
  - support: 1.12.0 (installed 1.8.0)
  - survey_client: 1.17.0 (installed 1.13.0)
  - suspicious_login: 7.0.0 (installed 6.0.0)
  - systemtags: 1.19.0 (installed 1.15.0)
  - text: 3.10.1 (installed 3.6.0)
  - weather_status: 1.9.0 (installed 1.5.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"eWhNjNsErFsMqaIXhvRq","level":3,"time":"June 26, 2024 15:29:02","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Exception while scanning storage \"smb::another-username@10.0.0.5//DAB//PersonalData/\"","userAgent":"--","version":"29.0.3.4","exception":{"Exception":"Icewind\\SMB\\Exception\\Exception","Message":"Unknown error (24) for /PersonalData","Code":24,"Trace":[{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","line":49,"function":"unknown","class":"Icewind\\SMB\\Exception\\Exception","type":"::"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":75,"function":"fromMap","class":"Icewind\\SMB\\Exception\\Exception","type":"::"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":92,"function":"handleError","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":351,"function":"testResult","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":305,"function":"getxattr","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php","line":43,"function":"getAttribute","class":"Icewind\\SMB\\Native\\NativeShare","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php","line":69,"function":"stat","class":"Icewind\\SMB\\Native\\NativeFileInfo","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":114,"function":"getSize","class":"Icewind\\SMB\\Native\\NativeFileInfo","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":201,"function":"stat","class":"Icewind\\SMB\\Native\\NativeShare","type":"->"},{"file":"/mnt/data/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":587,"function":"getFileInfo","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":605,"function":"getMetaData","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":140,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":605,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":605,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":125,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":162,"function":"getData","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/View.php","line":1508,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Node/Folder.php","line":102,"function":"getDirectoryContent","class":"OC\\Files\\View","type":"->"},{"function":"getDirectoryListing","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Node/LazyFolder.php","line":84,"function":"call_user_func_array"},{"file":"/mnt/data/nextcloud/lib/private/Files/Node/LazyFolder.php","line":442,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/mnt/data/nextcloud/core/BackgroundJobs/GenerateMetadataJob.php","line":97,"function":"getDirectoryListing","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/mnt/data/nextcloud/core/BackgroundJobs/GenerateMetadataJob.php","line":88,"function":"scanFolder","class":"OC\\Core\\BackgroundJobs\\GenerateMetadataJob","type":"->"},{"file":"/mnt/data/nextcloud/core/BackgroundJobs/GenerateMetadataJob.php","line":74,"function":"scanFilesForUser","class":"OC\\Core\\BackgroundJobs\\GenerateMetadataJob","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OC\\Core\\BackgroundJobs\\GenerateMetadataJob","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","Line":31,"message":"Exception while scanning storage \"smb::zkahn@10.0.0.5//DAB//PersonalData/\"","exception":{},"CustomMessage":"Exception while scanning storage \"smb::zkahn@10.0.0.5//DAB//PersonalData/\""}}
{"reqId":"eWhNjNsErFsMqaIXhvRq","level":2,"time":"June 26, 2024 15:29:02","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Used memory grew by more than 10 MB when executing job OC\\Core\\BackgroundJobs\\GenerateMetadataJob (id: 182776, arguments: null): 763.2 MB (before: 32.2 MB)","userAgent":"--","version":"29.0.3.4","data":{"app":"cron"}}
{"reqId":"eWhNjNsErFsMqaIXhvRq","level":2,"time":"June 26, 2024 15:29:02","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Cron job used more than 300 MB of ram after executing job OC\\Core\\BackgroundJobs\\GenerateMetadataJob (id: 182776, arguments: null): 803.1 MB (before: 32.2 MB)","userAgent":"--","version":"29.0.3.4","data":{"app":"cron"}}
{"reqId":"lpEFz1pZCKo4YwNISPgp","level":3,"time":"June 26, 2024 17:15:54","remoteAddr":"","user":"--","app":"files","method":"","url":"--","message":"Error while trying to scan mount as /another-username/:An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","userAgent":"--","version":"29.0.3.4","exception":{"Exception":"Doctrine\\DBAL\\Exception\\ConnectionException","Message":"An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1943,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1891,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":257,"function":"convertException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":192,"function":"connectTo","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":173,"function":"performConnect","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":224,"function":"performConnect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":322,"function":"ensureConnectedToPrimary","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Cache.php","line":497,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Cache.php","line":534,"function":"getId","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":616,"function":"inCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Utils/Scanner.php","line":186,"function":"backgroundScan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":76,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":113,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":101,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php","line":40,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":255,"function":"connect","class":"Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":192,"function":"connectTo","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":173,"function":"performConnect","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":224,"function":"performConnect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":322,"function":"ensureConnectedToPrimary","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Cache.php","line":497,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Cache.php","line":534,"function":"getId","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":616,"function":"inCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Utils/Scanner.php","line":186,"function":"backgroundScan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":76,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":113,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php","line":34,"function":"__construct","class":"PDO","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":255,"function":"connect","class":"Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":192,"function":"connectTo","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":173,"function":"performConnect","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":224,"function":"performConnect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":322,"function":"ensureConnectedToPrimary","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Cache.php","line":497,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Cache.php","line":534,"function":"getId","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":616,"function":"inCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Utils/Scanner.php","line":186,"function":"backgroundScan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":76,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":113,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php","Line":34}},"message":"Error while trying to scan mount as /abaraut/:An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","exception":{},"CustomMessage":"Error while trying to scan mount as /abaraut/:An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory"}}
{"reqId":"lpEFz1pZCKo4YwNISPgp","level":3,"time":"June 26, 2024 17:15:54","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job OCA\\Files\\BackgroundJob\\ScanFiles (id: 4, arguments: null)","userAgent":"--","version":"29.0.3.4","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":295,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":97,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":115,"function":"getUserToScan","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\ConnectionException","Message":"An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1943,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1891,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":257,"function":"convertException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":192,"function":"connectTo","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":173,"function":"performConnect","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":224,"function":"performConnect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":322,"function":"ensureConnectedToPrimary","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":97,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":115,"function":"getUserToScan","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":101,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php","line":40,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":255,"function":"connect","class":"Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":192,"function":"connectTo","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":173,"function":"performConnect","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":224,"function":"performConnect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":322,"function":"ensureConnectedToPrimary","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":97,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":115,"function":"getUserToScan","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php","line":34,"function":"__construct","class":"PDO","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":255,"function":"connect","class":"Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":192,"function":"connectTo","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":173,"function":"performConnect","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":224,"function":"performConnect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/Connection.php","line":322,"function":"ensureConnectedToPrimary","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":348,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":97,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/mnt/data/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":115,"function":"getUserToScan","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/mnt/data/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php","Line":34}}},"message":"Error while running background job OCA\\Files\\BackgroundJob\\ScanFiles (id: 4, arguments: null)","exception":{},"CustomMessage":"Error while running background job OCA\\Files\\BackgroundJob\\ScanFiles (id: 4, arguments: null)"}}
{"reqId":"lpEFz1pZCKo4YwNISPgp","level":2,"time":"June 26, 2024 17:15:54","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Background job OCA\\Files\\BackgroundJob\\ScanFiles (id: 4, arguments: null) ran for 7251 seconds","userAgent":"--","version":"29.0.3.4","data":{"app":"cron"}}
{"reqId":"lpEFz1pZCKo4YwNISPgp","level":3,"time":"June 26, 2024 17:15:54","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","userAgent":"--","version":"29.0.3.4","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","Code":2002,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1659,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":866,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/doctrine/dbal/src/Query/Expression/ExpressionBuilder.php","line":321,"function":"quote","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php","line":422,"function":"literal","class":"Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/BackgroundJob/JobList.php","line":366,"function":"literal","class":"OC\\DB\\QueryBuilder\\ExpressionBuilder\\ExpressionBuilder","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/BackgroundJob/JobList.php","line":356,"function":"unlockJob","class":"OC\\BackgroundJob\\JobList","type":"->"},{"file":"/mnt/data/nextcloud/cron.php","line":211,"function":"setLastJob","class":"OC\\BackgroundJob\\JobList","type":"->"}],"File":"/mnt/data/nextcloud/lib/private/DB/Connection.php","Line":163,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory"}}
{"reqId":"V3Z7BxJyzVIb3eosCNQ9","level":3,"time":"June 26, 2024 17:17:56","remoteAddr":"HIDDEN","user":"huntervcx","app":"index","method":"GET","url":"/apps/files/api/v1/stats","message":"\"files/1be8d6513966b1275d5edf9b73a59a8a\"(\"scanner::\") is locked, existing lock on file: exclusive","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0","version":"29.0.3.4","exception":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/1be8d6513966b1275d5edf9b73a59a8a\"(\"scanner::\") is locked, existing lock on file: exclusive","Code":0,"Trace":[{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":351,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":261,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":317,"function":"oneTimeUserSetup","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":222,"function":"setupForUserWith","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":394,"function":"setupForUser","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Mount/Manager.php","line":97,"function":"setupForPath","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/View.php","line":1382,"function":"find","class":"OC\\Files\\Mount\\Manager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Filesystem.php","line":711,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/legacy/OC_Helper.php","line":505,"function":"getFileInfo","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/mnt/data/nextcloud/apps/files/lib/Controller/ApiController.php","line":270,"function":"getStorageInfo","class":"OC_Helper","type":"::"},{"file":"/mnt/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getStorageStats","class":"OCA\\Files\\Controller\\ApiController","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/mnt/data/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/mnt/data/nextcloud/lib/private/Files/Storage/Common.php","Line":774,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/1be8d6513966b1275d5edf9b73a59a8a\"(\"home::huntervcx::scanner::\") is locked, existing lock on file: exclusive","Code":0,"Trace":[{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Common.php","line":772,"function":"acquireLock","class":"OC\\Lock\\MemcacheLockingProvider","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Cache/Scanner.php","line":351,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":261,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":317,"function":"oneTimeUserSetup","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":222,"function":"setupForUserWith","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/SetupManager.php","line":394,"function":"setupForUser","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Mount/Manager.php","line":97,"function":"setupForPath","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/View.php","line":1382,"function":"find","class":"OC\\Files\\Mount\\Manager","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Files/Filesystem.php","line":711,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/legacy/OC_Helper.php","line":505,"function":"getFileInfo","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/mnt/data/nextcloud/apps/files/lib/Controller/ApiController.php","line":270,"function":"getStorageInfo","class":"OC_Helper","type":"::"},{"file":"/mnt/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getStorageStats","class":"OCA\\Files\\Controller\\ApiController","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/mnt/data/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/mnt/data/nextcloud/lib/private/Lock/MemcacheLockingProvider.php","Line":95},"message":"\"files/1be8d6513966b1275d5edf9b73a59a8a\"(\"scanner::\") is locked, existing lock on file: exclusive","exception":{},"CustomMessage":"\"files/1be8d6513966b1275d5edf9b73a59a8a\"(\"scanner::\") is locked, existing lock on file: exclusive"}}

Additional info

This can be considered as a security issue, but hackerone is locked to submit

Issue present on v29.0.0.19 and v29.0.3.4

nickvergessen commented 2 days ago

Tried to truncate oc_filecache multiple times

Congratulations, you just broke your server. You should not purge that table. The fileids are reused in other places, e.g. in shares and that is mostlikely what is causing your issue

huntervcx commented 2 days ago

Issue was before the truncate on a new server initialized with the same smb shares; and same issue on other server on v29.0.0.19 (with auto truncate enabled, admit for this one) Tried the truncate as it was a same behavior as #45238 (showing wrong folder listing, truncate was the only way to refresh)

Problem remains the same : NC doesn't seems to load the files from backend share but only from his filecache table. And doesn't compare file_hash, as it opens files from other shares, that the user never had access to

solracsf commented 2 days ago

Why in hell did you think it was a good idea to truncate an essential table for Nextcloud? This could NEVER be a solution for anything 😭

Only a backup restore can save you, otherwise you're good to restart your server from scratch.

Sorry to say, but this is not a bug, and no-one can help you here. 🥴

huntervcx commented 2 days ago

Issue was before the truncate on a new server initialized with the same smb shares; and same issue on other server on v29.0.0.19 (with auto truncate enabled, admit for this one) Tried the truncate as it was a same behavior as #45238 (showing wrong folder listing, truncate was the only way to refresh)

Problem remains the same : NC doesn't seems to load the files from backend share but only from his filecache table. And doesn't compare file_hash, as it opens files from other shares, that the user never had access to

As said just before, on a new server with same setup, same behavior after a while (>20days) and random folders/files, and pretty big oc_filecache table with fileid corresponding on other tables. truncate was a test on a secondary server, with same config, that temporarly fixed other issues of listing folders on external storage

the issue is here without any modification to the db. That's why I reported it initally, as it's random and sometimes revert to the normal files after a lot of time (>6hours while being under massive load from users) Issue also here with or without redis for cache and filelock, with and without preview enabled, some stock apps enabled and disabled

solracsf commented 2 days ago

In that case continue your debug at https://github.com/nextcloud/server/issues/45238 because here there is nothing we can do about it.

AGAIN, oc_filecache is not a "cache" in any means (even if the name of the table is not perfect, it should be more like oc_filetable).