ForbiddenException during cron.php

Steps to reproduce

  1. Run “sudo -u apache /usr/bin/php /var/www/html/owncloud/cron.php” from CLI or from crond

Expected behaviour

No errors in logfile.

Actual behaviour

Just FYI - I have already run: occ files:scan --all and occ files:cleanup

I still see 7 or so of the following errors every time cron.php is invoked:

{“reqId”:“tUfIo5pD0Gg8FON7Dtlj”,“level”:3,“time”:“2019-04-16T16:45:14-07:00”,“remoteAddr”:"",“user”:"–",“app”:“files”,“method”:"–",“url”:"/cloud/cron.php",“message”:“Exception: {“Exception”:“OC\\ForbiddenException”,“Message”:”",“Code”:0,“Trace”:"#0 \/home\/html\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php(139): OC\\Files\\Utils\\Scanner->shouldScan(Object(OC\\Files\\Mount\\MountPoint))\n#1 \/home\/html\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan(’’)\n#2 \/home\/html\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \/home\/html\/owncloud\/lib\/private\/BackgroundJob\/Job.php(57): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \/home\/html\/owncloud\/lib\/private\/BackgroundJob\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \/home\/html\/owncloud\/cron.php(120): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}",“File”:"\/home\/html\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php",“Line”:192}"}

Server configuration

Operating system:

RedHat Enterprise Linux (RHEL) 6

Linux 2.6.32-754.12.1.el6.x86_64 #1 SMP Thu Mar 7 22:07:44 EST 2019 x86_64 x86_64 x86_64 GNU/Linux

Web server:

Server version: Apache/2.2.15 (Unix)
Server built: Feb 19 2018 06:33:clock11:

Database:

compat-mysql51.x86_64 5.1.54-1.el6.remi @remi
mysql.x86_64 5.5.47-1.el6.remi @remi
mysql-libs.x86_64 5.5.47-1.el6.remi @remi
mysql-server.x86_64 5.5.47-1.el6.remi @remi
php-mysqlnd.x86_64 7.2.17-1.el6.remi @remi-php72
php72-php-mysqlnd.x86_64 7.2.17-1.el6.remi @remi-safe

PHP version:

PHP 7.2.17 (cli) (built: Apr 3 2019 10:16:22) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.2.17, Copyright © 1999-2018, by Zend Technologies

ownCloud version: (see ownCloud admin page)

10.1.1

Updated from an older ownCloud or fresh install:

Updated from an older 9.x ownCloud installation.

Where did you install ownCloud from:

Downloaded latest server from owncloud.org

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

{
    "system": {
        "theme": "",
        "instanceid": "oc3694650434",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "localhost",
            "127.0.0.1"
        ],
        "datadirectory": "\/owncloud",
        "dbtype": "mysql",
        "version": "10.1.1.1",
        "dbname": "owncloud_pre",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "logtimezone": "America\/Los_Angeles",
        "forcessl": true,
        "overwritewebroot": "\/cloud",
        "overwrite.cli.url": "\/cloud",
        "loglevel": 2,
        "log_type": "owncloud",
        "logfile": "\/var\/log\/owncloud.log",
        "syslog_tag": "ownCloud",
        "log.syslog.format": "[%reqId%][%remoteAddr%][%user%][%app%][%method%][%url%] %message%",
        "ldapIgnoreNamingRules": false,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "auto",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "php",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379
        },
        "memcache.locking": "\\OC\\Memcache\\Redis"
    }
}


List of activated apps:

Enabled:
  - activity: 2.4.2
  - comments: 0.3.0
  - configreport: 0.1.2
  - dav: 0.4.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_pdfviewer: 0.11.0
  - files_sharing: 0.11.0
  - files_trashbin: 0.9.1
  - files_videoplayer: 0.9.9
  - gallery: 16.1.1
  - market: 0.4.0
  - notifications: 0.4.1
  - provisioning_api: 0.5.0
  - sensorlogger: 0.1.0.1
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
  - user_ldap: 0.13.0
Disabled:
  - encryption
  - external
  - files_versions
  - firstrunwizard
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/…

NFS mounted volume, mounted locally under /owncloud

Are you using encryption: yes/no

NO

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

LDAP

LDAP configuration (delete this part if not used)

+-------------------------------+-----------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                       |
+-------------------------------+-----------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                         |
| hasPagedResultSupport         |                                                                                                           |
| homeFolderNamingRule          |                                                                                                           |
| lastJpegPhotoLookup           | 0                                                                                                         |
| ldapAgentName                 | cn=foo,dc=foo,dc=foo,dc=edu                                                                        |
| ldapAgentPassword             | ***                                                                                                       |
| ldapAttributesForGroupSearch  |                                                                                                           |
| ldapAttributesForUserSearch   |                                                                                                           |
| ldapBackupHost                |                                                                                                           |
| ldapBackupPort                |                                                                                                           |
| ldapBase                      | dc=foo,dc=foo,dc=edu                                                                                   |
| ldapBaseGroups                | dc=foo,dc=foo,dc=edu                                                                                   |
| ldapBaseUsers                 | dc=foo,dc=foo,dc=edu                                                                                   |
| ldapCacheTTL                  | 600                                                                                                       |
| ldapConfigurationActive       | 1                                                                                                         |
| ldapDynamicGroupMemberURL     |                                                                                                           |
| ldapEmailAttribute            | mail                                                                                                      |
| ldapExperiencedAdmin          | 0                                                                                                         |
| ldapExpertUUIDGroupAttr       |                                                                                                           |
| ldapExpertUUIDUserAttr        | entryuuid                                                                                                 |
| ldapExpertUsernameAttr        | uid                                                                                                       |
| ldapGroupDisplayName          | cn                                                                                                        |
| ldapGroupFilter               | (&(|(objectclass=posixGroup))(|(cn=uploaders)))                                                           |
| ldapGroupFilterGroups         | uploaders                                                                                                 |
| ldapGroupFilterMode           | 1                                                                                                         |
| ldapGroupFilterObjectclass    | posixGroup                                                                                                |
| ldapGroupMemberAssocAttr      | memberUid                                                                                                 |
| ldapHost                      | ldap1.rocket.net                                                                                          |
| ldapIgnoreNamingRules         |                                                                                                           |
| ldapLoginFilter               | (&(&(|(objectclass=posixAccount))(|(memberof=cn=uploaders,ou=groups,dc=foo,dc=foo,dc=edu)))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                                                                                           |
| ldapLoginFilterEmail          | 0                                                                                                         |
| ldapLoginFilterMode           | 1                                                                                                         |
| ldapLoginFilterUsername       | 1                                                                                                         |
| ldapNestedGroups              | 0                                                                                                         |
| ldapOverrideMainServer        | 0                                                                                                         |
| ldapPagingSize                | 500                                                                                                       |
| ldapPort                      | 389                                                                                                       |
| ldapQuotaAttribute            |                                                                                                           |
| ldapQuotaDefault              |                                                                                                           |
| ldapTLS                       | 1                                                                                                         |
| ldapUserDisplayName           | cn                                                                                                        |
| ldapUserDisplayName2          |                                                                                                           |
| ldapUserFilter                | (&(|(objectclass=posixAccount))(|(memberof=cn=uploaders,ou=groups,dc=foo,dc=foo,dc=edu)))              |
| ldapUserFilterGroups          | uploaders                                                                                                 |
| ldapUserFilterMode            | 1                                                                                                         |
| ldapUserFilterObjectclass     | posixAccount                                                                                              |
| ldapUserName                  | samaccountname                                                                                            |
| ldapUuidGroupAttribute        | auto                                                                                                      |
| ldapUuidUserAttribute         | auto                                                                                                      |
| turnOffCertCheck              | 1                                                                                                         |
| useMemberOfToDetectMembership | 1                                                                                                         |
+-------------------------------+-----------------------------------------------------------------------------------------------------------+

Client configuration

Browser:

Any, N/A

Operating system:

Any, N/A

Logs

ownCloud log (data/owncloud.log)

{"reqId":"tUfIo5pD0Gg8FON7Dtlj","level":3,"time":"2019-04-16T16:45:14-07:00","remoteAddr":"","user":"--","app":"files","method":"--","url":"\/cloud\/cron.php","message":"Exception: {\"Exception\":\"OC\\\\ForbiddenException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php(139): OC\\\\Files\\\\Utils\\\\Scanner->shouldScan(Object(OC\\\\Files\\\\Mount\\\\MountPoint))\\n#1 \\\/home\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(87): OC\\\\Files\\\\Utils\\\\Scanner->backgroundScan('')\\n#2 \\\/home\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(111): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->runScanner(Object(OC\\\\User\\\\User))\\n#3 \\\/home\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/Job.php(57): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->run(NULL)\\n#4 \\\/home\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/TimedJob.php(53): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#5 \\\/home\\\/html\\\/owncloud\\\/cron.php(120): OC\\\\BackgroundJob\\\\TimedJob->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#6 {main}\",\"File\":\"\\\/home\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php\",\"Line\":192}"}

Can you try mounting this volume with SMB via Storage in ownCloud? The error message should be more precise if it‘s coming from oC instead of a locally mounted volume.

1 Like

I’m having a very similar error every time the cron job is executing (30 mins).
I use version 10.3.0 on CentOS 6, with no external storage.
What is the cause of this?

Here are some errors from my log:

{"reqId":"e20XLivMcndO5m8smrxb","level":3,"time":"2019-11-07T10:30:02+00:00","remoteAddr":"","user":"--","app":"files","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\\\\ForbiddenException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php(139): OC\\\\Files\\\\Utils\\\\Scanner->shouldScan(Object(OC\\\\Files\\\\Mount\\\\MountPoint))\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(85): OC\\\\Files\\\\Utils\\\\Scanner->backgroundScan('')\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(109): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->runScanner(Object(OC\\\\User\\\\User))\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/Job.php(66): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->run(NULL)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/TimedJob.php(63): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/core\\\/Command\\\/System\\\/Cron.php(119): OC\\\\BackgroundJob\\\\TimedJob->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(255): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(963): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(254): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\System\\\\Cron), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(147): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/console.php(106): OC\\\\Console\\\\Application->run()\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#13 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php\",\"Line\":192}"}

{"reqId":"QLsuJG2eHJl6dsOtcAjQ","level":3,"time":"2019-11-07T11:00:01+00:00","remoteAddr":"","user":"--","app":"files","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\\\\ForbiddenException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php(139): OC\\\\Files\\\\Utils\\\\Scanner->shouldScan(Object(OC\\\\Files\\\\Mount\\\\MountPoint))\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(85): OC\\\\Files\\\\Utils\\\\Scanner->backgroundScan('')\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(109): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->runScanner(Object(OC\\\\User\\\\User))\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/Job.php(66): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->run(NULL)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/TimedJob.php(63): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/core\\\/Command\\\/System\\\/Cron.php(119): OC\\\\BackgroundJob\\\\TimedJob->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(255): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(963): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(254): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\System\\\\Cron), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(147): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/console.php(106): OC\\\\Console\\\\Application->run()\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#13 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php\",\"Line\":192}"}

{"reqId":"xmummscwUjfR2nlk54pg","level":3,"time":"2019-11-07T11:30:01+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Market\\\\SyncJob! Class OCA\\\\Market\\\\SyncJob does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(110): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Market\\\\\\\\Sync...')\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/ServerContainer.php(86): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Market\\\\\\\\Sync...')\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(253): OC\\\\ServerContainer->query('OCA\\\\\\\\Market\\\\\\\\Sync...')\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(209): OC\\\\BackgroundJob\\\\JobList->buildJob(Array)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/core\\\/Command\\\/System\\\/Cron.php(110): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(255): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(963): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(254): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\System\\\\Cron), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(147): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/console.php(106): OC\\\\Console\\\\Application->run()\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php\",\"Line\":96}"}

{"reqId":"xmummscwUjfR2nlk54pg","level":3,"time":"2019-11-07T11:30:01+00:00","remoteAddr":"","user":"--","app":"files","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\\\\ForbiddenException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php(139): OC\\\\Files\\\\Utils\\\\Scanner->shouldScan(Object(OC\\\\Files\\\\Mount\\\\MountPoint))\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(85): OC\\\\Files\\\\Utils\\\\Scanner->backgroundScan('')\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(109): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->runScanner(Object(OC\\\\User\\\\User))\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/Job.php(66): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->run(NULL)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/TimedJob.php(63): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/core\\\/Command\\\/System\\\/Cron.php(119): OC\\\\BackgroundJob\\\\TimedJob->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(255): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(963): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(254): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\System\\\\Cron), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(147): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/console.php(106): OC\\\\Console\\\\Application->run()\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#13 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php\",\"Line\":192}"}

Hey,

“ForbiddenException” sounds to me like some problems with access permissions to the file storage on operating system level (wrong file permissions, wrong mount options, …).

1 Like

I think you were definitely right.
There was a user that never accessed its account and somehow its storage space had wrong permissions.

When running “php occ files:scan X” I got: “Home storage for user X not writable”

I deleted the user and the error disappeared.

Thanks a lot

2 Likes