Nextcloud shares not working "This directory is unavailable"

Nextcloud version (eg, 20.0.5): 22.1.1.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:

Since, I think the upgrade to NC 22.1, my shares all show “This directory is unavailable, please check the logs or contact the administrator” when trying to access them via browser. Log doesn’t show anything and I’m out of ideas what to try next. Log shows nothing helpful at levels 0 and 1 to be more specific except deprecation warnings

  • This happens to old and newly shared folders

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

Steps to replicate it:

  1. Create shared link or use previously generated link
  2. Open in browser
  3. Get error message

The output of your Nextcloud log in Admin > Logging:

Nothing to see here

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

$CONFIG = array (
  'instanceid' => 'XXXX',
  'passwordsalt' => 'XXXX',
  'secret' => 'XXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXX',
    1 => 'XXXX',
    2 => 'XXXX',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'overwrite.cli.url' => 'XXXXX',
  'dbtype' => 'mysql',
  'version' => '22.1.1.2',
  'default_phone_region' => 'DE',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'XXXXX',
  'logtimezone' => 'UTC',
  'installed' => true,
  'theme' => '',
  'maintenance' => false,
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 1.5,
    'password' => 'XXXXX',
  ),
  'updater.release.channel' => 'stable',
  'overwriteprotocol' => 'https',
  'mysql.utf8mb4' => true,
  'app_install_overwrite' => 
  array (
    0 => 'spreed',
    1 => 'bruteforcesettings',
    2 => 'geoblocker',
  ),
  'loglevel' => 0,
  'logfile'  => '/var/log/nextcloud.log',
);

The output of your Apache/nginx/system log in /var/log/apache/error.log:

[Sat Sep 04 11:13:21.096439 2021] [access_compat:error] [pid 643001] [client XXXX:50351] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:27:52.664770 2021] [access_compat:error] [pid 643045] [client XXXX:50668] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:28:00.509613 2021] [access_compat:error] [pid 643076] [client XXXX:50683] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:28:01.780529 2021] [access_compat:error] [pid 643282] [client XXXX:50686] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:28:03.124093 2021] [access_compat:error] [pid 643826] [client XXXX:50692] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:28:43.903894 2021] [access_compat:error] [pid 644181] [client XXXX:50703] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:29:17.161967 2021] [access_compat:error] [pid 644338] [client XXXX:50711] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Sat Sep 04 11:29:23.894299 2021] [access_compat:error] [pid 643282] [client XXXX:50713] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
1 Like

Sharing files works fine, download button works fine as well, only directory listing doesn’t

Bug in Deck app. disable Deck app an sharing is working again

3 Likes

Thank you!

it worked for me too, thanks!