OCC Scan Error: Home storage for user not writable

The issue you are facing:
Hello guys,

I have some issue with my Nextcloud, it’s working fine before but after some problem on my server, i have restarted and this issue occur.

What happened is i cant really download my files from NC, the files are available in the storage, permission is fine, no config changes afaik.

I have restarted my machine, and re-mount the data disk. But its not fixing the issue.

Anyone facing this issue before, or can help with pointing to the right direction for my troubleshooting?

Thanks

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

[/details]

Nextcloud version (eg, 20.0.5): 23.0.2
Operating system and version (eg, Ubuntu 20.04): CentOS Linux release 7.9.2009
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.6 (CentOS)
PHP version (eg, 7.4): PHP 7.4.24 (cli)

Is this the first time you’ve seen this error? (Y/N):
Y

Steps to replicate it:

  1. sudo -u apache php occ files:scan [user]

The output of your Nextcloud log in Admin > Logging:

In image attachemtn

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'htaccess.RewriteBase' => '/',
  'instanceid' => 'instance',
  'loglevel' => 0,
  'logtimezone' => 'timzeon',
  'passwordsalt' => 'salt',
  'secret' => 'secret',
  'trusted_domains' =>
  array (
    0 => 'domain.com',
    1 => 'IP 1',
    2 => 'IP 2',
    3 => 'IP 3',
  ),
  'datadirectory' => '/nextcloud_data/nextcloud17/data',
  'dbtype' => 'mysql',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'overwriteprotocol' => 'https',
  'overwritecondaddr' => '',
  'version' => '23.0.2.1',
  'dbname' => 'nextcloud18_db',
  'dbhost' => 'dbhost.com:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud_user',
  'dbpassword' => 'password',
  'installed' => true,
  'maintenance' => false,
  'updater.secret' => 'secret',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
    0 => 'nextcloud-users',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
    0 => 'system-user',
  ),
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'domain.com',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtpdm-ap-southeast-1.aliyun.com',
  'mail_smtpport' => '80',
  'mail_smtpname' => 'nextcloud@domain.com',
  'mail_smtppassword' => 'password',
  'updater.release.channel' => 'stable',
  'data-fingerprint' => 'fingerprint',
);

The output of your Apache/nginx/system log in /var/log/____:


> [Sun Jul 17 03:36:01.972893 2022] [lbmethod_heartbeat:notice] [pid 2131] AH02282: No slotmem from mod_heartmonitor
[Sun Jul 17 03:36:02.023268 2022] [mpm_prefork:notice] [pid 2131] AH00163: Apache/2.4.6 (CentOS) PHP/7.4.24 configured -- resuming normal operations
[Sun Jul 17 03:36:02.023286 2022] [core:notice] [pid 2131] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
cat: /sys/class/net/eth0/speed: Invalid argument
cat: /sys/class/net/eth0/duplex: Invalid argument
[Sun Jul 17 16:44:18.314592 2022] [access_compat:error] [pid 12696] [client 100.120.60.115:26584] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Jul 17 16:45:53.842826 2022] [access_compat:error] [pid 12926] [client 100.120.60.18:10874] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
cat: /sys/class/net/eth0/speed: Invalid argument
cat: /sys/class/net/eth0/duplex: Invalid argument
[root@iZ8psf7qfxvt2826z6lim2Z httpd]# tail error_log
[Sun Jul 17 03:36:01.972893 2022] [lbmethod_heartbeat:notice] [pid 2131] AH02282: No slotmem from mod_heartmonitor
[Sun Jul 17 03:36:02.023268 2022] [mpm_prefork:notice] [pid 2131] AH00163: Apache/2.4.6 (CentOS) PHP/7.4.24 configured -- resuming normal operations
[Sun Jul 17 03:36:02.023286 2022] [core:notice] [pid 2131] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
cat: /sys/class/net/eth0/speed: Invalid argument
cat: /sys/class/net/eth0/duplex: Invalid argument
[Sun Jul 17 16:44:18.314592 2022] [access_compat:error] [pid 12696] [client 100.120.60.115:26584] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Jul 17 16:45:53.842826 2022] [access_compat:error] [pid 12926] [client 100.120.60.18:10874] AH01797: client denied by server configuration: /var/www/html/nextcloud/config


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE