[Solved] Exception DAV Forbidden No read permissions

Nextcloud version : 13.0.5
Operating system and version: Debian 9
Nginx version: 1.10.3-1
PHP version : 7.0.30

The issue you are facing:
I try to access some files from the web interface and I always have the same error (only visible on the log): Exception":“OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden”,“Message”:“No read permissions”

Is this the first time you’ve seen this error? : Y

Steps to replicate it:

  1. Open a folder/file on the web application

The output Nextcloud log in Admin > Logging:

	OCA\DAV\Connector\Sabre\Exception\Forbidden: No read permissions
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/TagsPlugin.php - line 224: OCA\DAV\Connector\Sabre\Directory->getChildren()
[internal function] OCA\DAV\Connector\Sabre\TagsPlugin->handleGetProperties(Object(Sabre\DAV\PropFind), Object(OCA\DAV\Connector\Sabre\Directory))
/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1059: Sabre\Event\EventEmitter->emit('propFind', Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 981: Sabre\DAV\Server->getPropertiesByNode(Object(Sabre\DAV\PropFind), Object(OCA\DAV\Connector\Sabre\Directory))
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1666: Sabre\DAV\Server->getPropertiesIteratorForPath('Administratif', Array, 1)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 359: Sabre\DAV\Server->generateMultiStatus(Object(Generator), false)
[internal function] Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PROPFIND', Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 164: require_once('/var/www/nextcl...')
{main}

config.php:

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'mydomain.com',
  ),
  'datadirectory' => '/storage/nextcloud/data',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '13.0.5.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'tempdirectory' => '/storage/nextcloud/temp',
);

I found the problem: my mistake defining a file access rule that removes me all access to the files ^^

2 Likes

where was that rule?

If I remember correctly it was on an external application (Sabre I think?) not available now with the new version of NextCloud.

thanks for the answer. yeah just noticed Exception":“OCA\DAV\Connector\Sabre\Exception\Forbidden”,“Message”:“No read permissions” in your first post.

I guess this has been replaced by the “File access control” app. This app basically gives you the same ability over your shared files/folders by setting rules. Looks like the error I got that looked a lot like yours is gone now. Maybe updating to 15.0.7 fixed it. Hope it will remain in this state.