Error: This operation is forbidden

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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:

Nextcloud version (eg, 12.0.2): 16.0.6
Operating system and version (eg, Ubuntu 17.04): FreeNAS-11.2-U6
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (FreeBSD)
PHP version (eg, 7.1): 7.2.22 (cli)

The issue you are facing:

Can not access any files on NC server under any user after connecting ONLYOFFICE Community Server to NC account via WebDAV.

I set this Nextcloud server up for family use. My wife and I are the only 2 users, and I created an Admin user out of habit. I connected my account to my ONLYOFFICE account and all hell broke loose. The wife and I use the mobile apps for Android and iPhone, as well as the PC apps for Linux and Windows. They are all erring. When I connect to a folder from inside ONLYOFFICE, it shows zero contents. From inside Nextcloud, when clicking a file or folder, it gives the error: This operation is forbidden

I can see data in the data directory, when logged in via SSH, but server-side encryption is enabled, so viewing files to check for corruption or missing data is pointless.

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

Steps to replicate it:

  1. Log into ONLYOFFICE Community Server
  2. Click Documents
  3. Add account (Nextclolud)
  4. Open Nextcloud web portal and attempt to enter any folder

The output of your Nextcloud log in Admin > Logging:

There are several hundred errors, but all are of the following 3 types:

[webdav] Fatal: OCA\DAV\Connector\Sabre\Exception\Forbidden: No read permissions at <<closure>>

 0. /usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/TagsPlugin.php line 224
    OCA\DAV\Connector\Sabre\Directory->getChildren()
 1. <<closure>>
    OCA\DAV\Connector\Sabre\TagsPlugin->handleGetProperties(Sabre\DAV\PropFind {}, OCA\DAV\Connector\Sabre\Directory {})
 2. /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([OCA\DAV\Connect ... "], [Sabre\DAV\PropF ... }])
 3. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1059
    Sabre\Event\EventEmitter->emit("propFind", [Sabre\DAV\PropF ... }])
 4. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 981
    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\DAV\Connector\Sabre\Directory {})
 5. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath("files/King/Desktop", ["{DAV:}getlastm ... "], 1)
 6. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
 7. <<closure>>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 8. /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
 9. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
10. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
11. /usr/local/www/nextcloud/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
12. /usr/local/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
13. /usr/local/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/usr/local/www/ ... p")

PROPFIND /remote.php/dav/files/King/Desktop
from 10.1.1.1 by King at 2019-11-24T04:35:22+00:00

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 1024000 got 80901 at <<closure>>

 0. /usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
    OCA\DAV\Connector\Sabre\File->put(null)
 1. /usr/local/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php line 45
    OCA\DAV\Connector\Sabre\Directory->createFile("0000000000000000-0000000001023999", null)
 2. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    OCA\DAV\Upload\UploadFolder->createFile("0000000000000000-0000000001023999", null)
 3. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    Sabre\DAV\Server->createFile("uploads/Queen/8 ... 9", null, null)
 4. <<closure>>
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 5. /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
 6. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
 7. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 8. /usr/local/www/nextcloud/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
 9. /usr/local/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
10. /usr/local/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/usr/local/www/ ... p")

PUT /remote.php/dav/uploads/Queen/8744f55c7241b7ef50bb60eaeb8de396/0000000000000000-0000000001023999
from 10.1.1.1 by Queen at 2019-11-24T04:22:32+00:00

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 1024000 got 80901 at <<closure>>

 0. /usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
    OCA\DAV\Connector\Sabre\File->put(null)
 1. /usr/local/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php line 45
    OCA\DAV\Connector\Sabre\Directory->createFile("0000000000000000-0000000001023999", null)
 2. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    OCA\DAV\Upload\UploadFolder->createFile("0000000000000000-0000000001023999", null)
 3. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    Sabre\DAV\Server->createFile("uploads/Queen/4 ... 9", null, null)
 4. <<closure>>
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 5. /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
 6. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
 7. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 8. /usr/local/www/nextcloud/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
 9. /usr/local/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
10. /usr/local/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/usr/local/www/ ... p")

PUT /remote.php/dav/uploads/Queen/44adc583e6bee17ee914194fed1db37e/0000000000000000-0000000001023999
from 10.1.1.1 by Queen at 2019-11-24T04:07:37+00:00



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

<?php
$CONFIG = array (
  'instanceid' => '*************',
  'passwordsalt' => '*****************************',
  'secret' => '*********************++++++++++++++***************',
  'trusted_domains' => 
  array (
    0 => '10.1.1.3',
    1 => 'example.com',
  ),
  'datadirectory' => '/mnt/data',
  'dbtype' => 'mysql',
  'version' => '16.0.6.1',
  'overwrite.cli.url' => 'http://10.1.1.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'Random_Password',
  'installed' => true,
  'redis' => 
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'example.com',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpport' => '587',
  'mail_smtphost' => 'mail.example.com',
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloud@Some-TLD.com',
  'mail_smtppassword' => 'Random-Password',
  'updater.release.channel' => 'production',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
);

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

[Tue Nov 12 04:09:27.469716 2019] [php7:error] [pid 92876] [client 10.1.1.1:38433] PHP Fatal error:  Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /usr/local/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\\DB\\Connection->connect()\n#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()\n#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\\DBAL\\Connection->getDatabasePlatform()\n#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\\DB\\Connection->__construct(Array, Objec in /usr/local/www/nextcloud/lib/private/DB/Connection.php on line 64
[Fri Nov 15 04:29:12.696707 2019] [authz_core:error] [pid 80191] [client 10.1.1.1:23707] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 08:18:27.815695 2019] [authz_core:error] [pid 86158] [client 10.1.1.1:47720] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 08:26:04.502888 2019] [authz_core:error] [pid 80185] [client 10.1.1.1:52621] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 08:31:37.644568 2019] [authz_core:error] [pid 80185] [client 10.1.1.1:56184] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 09:45:48.242778 2019] [authz_core:error] [pid 27204] [client 10.1.1.1:39357] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 10:05:19.805945 2019] [authz_core:error] [pid 32888] [client 10.1.1.1:52017] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 13:37:20.862270 2019] [authz_core:error] [pid 39583] [client 10.1.1.1:62377] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 13:37:53.016186 2019] [authz_core:error] [pid 39624] [client 10.1.1.1:62740] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 13:38:22.872376 2019] [authz_core:error] [pid 39589] [client 10.1.1.1:63132] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 15:29:32.410504 2019] [authz_core:error] [pid 40067] [client 10.1.1.1:8107] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Fri Nov 15 15:34:23.065954 2019] [authz_core:error] [pid 40147] [client 10.1.1.1:11322] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 18:48:41.559871 2019] [authz_core:error] [pid 87016] [client 10.1.1.1:52024] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 19:50:57.303231 2019] [authz_core:error] [pid 84970] [client 10.1.1.1:28950] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 21:52:31.120528 2019] [authz_core:error] [pid 96866] [client 10.1.1.1:46128] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 21:58:22.079003 2019] [authz_core:error] [pid 86990] [client 10.1.1.1:50014] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 23:05:12.220849 2019] [authz_core:error] [pid 94631] [client 10.1.1.1:30055] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 23:06:23.009534 2019] [authz_core:error] [pid 94675] [client 10.1.1.1:30834] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 23:12:08.416137 2019] [authz_core:error] [pid 97172] [client 10.1.1.1:34560] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sat Nov 16 23:15:07.147487 2019] [authz_core:error] [pid 94626] [client 10.1.1.1:36509] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sun Nov 17 13:06:07.146424 2019] [authz_core:error] [pid 8705] [client 10.1.1.1:58684] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sun Nov 17 14:46:54.886675 2019] [authz_core:error] [pid 97293] [client 10.1.1.1:65415] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Sun Nov 17 16:46:34.640348 2019] [authz_core:error] [pid 96621] [client 10.1.1.1:17734] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Mon Nov 18 01:16:36.124842 2019] [authz_core:error] [pid 27573] [client 10.1.1.1:29207] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Mon Nov 18 01:17:50.866051 2019] [authz_core:error] [pid 8707] [client 10.1.1.1:30032] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Mon Nov 18 02:31:09.929455 2019] [authz_core:error] [pid 97172] [client 10.1.1.1:13837] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Mon Nov 18 03:32:07.445841 2019] [authz_core:error] [pid 45786] [client 10.1.1.1:54047] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config
[Tue Nov 19 12:48:19.729583 2019] [authz_core:error] [pid 4774] [client 10.1.1.1:13381] AH01630: client denied by server configuration: /usr/local/www/nextcloud/config

Any possible information on this? It’s been days and I can’t find anything anywhere. For the record, I followed Samuel Dowling’s guide on installing Nextcloud into it’s own iocage jail, on FreeNAS, with hardened security, found HERE.

At this point, I am assuming data was somehow lost/corrupted when syncing. If so, I didn’t have a backup or anything, but it was nothing too important that can’t be re-uploaded over a few hours. I would just like to see if there’s a way to fix the actual problem before wiping the jail and starting fresh…And yes, I know… Next time, make sure to have everything backed up! Got it! :wink:

Bump. Having the same problem. Not getting much support from Nextcloud Community.