Forbidden Sabre\DAV\Exception\Forbidden error

#1

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.
Fran.

Strange forbidden errors after upgrade to nextcloud 14
#2

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:

#3

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”:“81.47.168.243”,“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\/Server.ph
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,
“User”:"fjose.merino@adderglobal.com"}",“level”:0,“time”:“2017-08-25T12:41:36+00:00”,“method”:“PROPFIND”,“url”:"/remote.php/
dav/uploads/fjose.merino@adderglobal.com/1682299093",“user”:“fjose.merino@adderglobal.com”,“version”:“11.0.0.10”}
{“reqId”:“24AlqEnVemuRX5nl7OWj”,“remoteAddr”:“81.47.168.243”,“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
rod-nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php",“Line”:161,“User”:“fjose.merino@adderglobal.com
”}",“level”:0,“time”:“2017-08-25T12:41:37+00:00”,“method”:“MKCOL”,“url”:"/remote.php/dav/uploads/fjose.merino@adderglobal.com
/1682295211",“user”:“fjose.merino@adderglobal.com”,“version”:“11.0.0.10”}

Can you help me?
Best regards.

#4

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

#5

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
#6

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?

Thanks

#7

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.

#8

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?