diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-27 14:15:56 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-27 14:17:56 +0200 |
commit | 5f6997f6fe0955e650625a769195e1e896a9f04e (patch) | |
tree | c60cd4c7911c32f3a120eab1f14ce05ba4be8d95 /apps/dav/lib | |
parent | 6435191a6e96600db9efbad8514d6c2eff1375d1 (diff) | |
download | nextcloud-server-5f6997f6fe0955e650625a769195e1e896a9f04e.tar.gz nextcloud-server-5f6997f6fe0955e650625a769195e1e896a9f04e.zip |
Add an hint about reasons why files can't be accessed
Hopefully saves some debugging time next time
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Directory.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index b575a051b2a..bffe99449cb 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -255,7 +255,11 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol if (!$this->info->isReadable()) { // return 403 instead of 404 because a 404 would make // the caller believe that the collection itself does not exist - throw new Forbidden('No read permissions'); + if (\OC_App::isEnabled('files_accesscontrol')) { + throw new Forbidden('No read permissions. This might be caused by files_accesscontrol, check your configured rules'); + } else { + throw new Forbidden('No read permissions'); + } } $folderContent = $this->getNode()->getDirectoryListing(); } catch (LockedException $e) { |