Forbidden Sabre\DAV\Exception\Forbidden error

Hi all,

I have a problem. I installed “Nextcloud Desktop” on a client machine.
When synchronice files to my server, I recieve this error for only some files:

server replied: Forbidden (Sabre\DAV\Exception\Forbidden)

All files with error occupy more than 10MB but I can’t resolve.

¿Can you help me please?

Best regards.

Files larger than 10 MB are transferred in smaller chunks. These chunks are stored in the temp folder and after the last chunk was received, the complete file is moved to the final destination. Your error can occur when you don’t have permission to use the temp folder, or the temp folder is too small. If it is our own server, you can fix the permissions, on shared hosting, you can define your own temp folder:

Thanks tflidd but the problem persist. I created /tmp/nextcloudtmp folder because not exists them. I configure permissions to www-data user and I configured this folder in config.php file. The problem persist.

I have this errors in server:

{“reqId”:“RmaYNQveuXColv2DUxmF”,“remoteAddr”:“”,“app”:“webdav”,“message”:“Exception: {“Message”:“HTTP\/1.1 404 F
ile with name \/\/1682299093 could not be located”,“Exception”:“Sabre\\DAV\\Exception\\NotFound”,“Code”:0,“Trace
”:”#0 \/nc\/prod-nextcloud\/apps\/dav\/lib\/Upload\/UploadHome.php(50): OCA\\DAV\\Connector\\Sabre\\Direct
ory->getChild(‘1682299093’)\n#1 \/nc\/prod-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php(76): OCA\\DAV\
\Upload\\UploadHome->getChild(‘1682299093’)\n#2 \/nc\/prod-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/
p(939): Sabre\\DAV\\Tree->getNodeForPath(‘uploads\/fjose.m…’)\n#3 \/nc\/prod-nextcloud\/3rdparty\/sabre\/dav\
/lib\/DAV\/CorePlugin.php(336): Sabre\\DAV\\Server->getPropertiesForPath(‘uploads\/fjose.m…’, Array, 1)\n#4 [internal
function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \
/nc\/prod-nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#6
\/nc\/prod-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘metho
d:PROPFIND’, Array)\n#7 \/nc\/prod-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Se
rver->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#8 \/nc\/prod-nextcloud\/apps\/d
av\/lib\/Server.php(227): Sabre\\DAV\\Server->exec()\n#9 \/nc\/prod-nextcloud\/apps\/dav\/appinfo\/v2\/remo
te.php(30): OCA\\DAV\\Server->exec()\n#10 \/nc\/prod-nextcloud\/remote.php(165): require_once(’\/nc\/prod-nextcl…
’)\n#11 {main}",“File”:"\/nc\/prod-nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php",“Line”:206,
{“reqId”:“24AlqEnVemuRX5nl7OWj”,“remoteAddr”:“”,“app”:“webdav”,“message”:“Exception: {“Message”:“HTTP\/1.1 403 F
orbidden”,“Exception”:“Sabre\\DAV\\Exception\\Forbidden”,“Code”:0,“Trace”:”#0 \/nc\/prod-nextcloud\/apps\/
dav\/lib\/Upload\/UploadHome.php(46): OCA\\DAV\\Connector\\Sabre\\Directory->createDirectory(‘1682295211’)\n#1 \/
nc\/prod-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1186): OCA\\DAV\\Upload\\UploadHome->createDire
ctory(‘1682295211’)\n#2 \/nc\/prod-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(590): Sabre\\DAV\
\Server->createCollection(‘uploads\/fjose.m…’, Object(Sabre\\DAV\\MkCol))\n#3 [internal function]: Sabre\\DAV\\CoreP
lugin->httpMkcol(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/nc\/prod-nextcloud\/3rdparty\
/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 \/nc\/prod-nextcloud\/3rdparty
\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘method:MKCOL’, Array)\n#6 \/nc\/prod
-nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP
\\Request), Object(Sabre\\HTTP\\Response))\n#7 \/nc\/prod-nextcloud\/apps\/dav\/lib\/Server.php(227): Sabre\\
DAV\\Server->exec()\n#8 \/nc\/prod-nextcloud\/apps\/dav\/appinfo\/v2\/remote.php(30): OCA\\DAV\\Server->exec(
)\n#9 \/nc\/prod-nextcloud\/remote.php(165): require_once(’\/nc\/prod-nextcl…’)\n#10 {main}",“File”:"\/nc\/p

Can you help me?
Best regards.

teWhat kind of system do you use and how did you install Nextcloud?

I know this is rather old but I had a similar issue and it took me a while to figure out what was wrong.

The solution came from deleting the {{username}}/uploads folder in the data directory. Everything worked fine after this.

1 Like

I’ve been changing configs for apache, php and nextcloud for a solid week now to fix this problem with my installation until I came across this thread.

smamessier, you solution worked perfectly! Thank you so much.

Can anybody explain what is up with this uploads folder? What is it used for and how could the presence of this folder lead to the 403 error?


Duuuuuuudeeeeee you are the man!!! I have been battling with this like it was a cancer in my body!!!

In my case it was not the upload folder but the folder Iwas trying to share contents. I deleted it and recreated and it worked.

Sadly the solution did not work for me. I deleted the {{username}}/uploads folder but still get the “Sabre\DAV\Exception\Forbidden” error from my desktop client.
Can anybody please help?

Hi NC team,

Thanks a lot for your great work, I have tried the solutions mentioned above but didn’t solve the problem, here is more details I’m facing.

I have a 00_Blank_Master_Structure folder for my team to use whenever they start a new task, they make a copy of that folder and rename the new folder with the task name.

  • when this issue starts it seems as if a subfolders are supposed to exist but not there, if a team member tries to recopy the missing structure to the correct location, then this issue happens.
  • showing the error on any file under the structure, please see the attached screenshot
  • usually while it tries to scan and sync the data it will delete some of the subfolders except the files having the error, notice in the screenshot the missing folders under the folders (01_PITCH & 02_PRODUCTION comparing with 01_PITCH_ & 02_PRODUCTION_).
  • if the error happens under a specific folder (in my case 01_PITCH & 02_PRODUCTION), it’s most likely attached the folder name and full path that had the issue, if I delete the folder and rescan the files on the server level to empty the current structure, then create with the same folder name it will again show the same error for the files under.
  • the only way to go around this error if the top folder is renamed, then all works fine (in my case renamed with the underscore 01_PITCH_ & 02_PRODUCTION_, shows how it’s synced with no issues).
  • If I attempt to recreate that folder with the original name it will still give the same error for any subfiles.

As the server remembers the folder path / name even after deleting and creating it will still have the issue, I think the folder name is listed somewhere in the database, and that specific folder might be the first step to track why this happens in the first place.

Kindly advise what additional details do you need from my side, this issue does not seem resolved from this aspect, it could be the difference in server configuration for each of us having the same problem.

Many thanks in advance,