Nextcloud server 20.0.11 running on Ubuntu 20.04.2 LTS using Apache2
Nextcloud client 3.3.3.20210903 running on Windows 21H1 build 19043.1165
I can upload files larger than 10 MB or so through the web interface but they do not sync through the Windows client. Files smaller than 10 MB sync correctly through the Windows client. I have checked the php.ini config and the limits are much more than 10 MB. I have checked permissions on the data directory and www-data is the owner of it and has permissions (and its subdirectories).
The error from my Windows client:
Server replied "403 Forbidden" to MKCOL https://[server ip]/nextcloud/remote.php/dav/uploads/user/164584880" (Could not create directory //164584880)
I recently reinstalled NextCloud after reconfiguring my server data partitions. Previously uploads larger than 10 MB worked on my NextCloud setup when using the Windows client.
well I haven’t found a solution yet but I believe it’s related to mod_dav, WebDav, or SabreDav. not sure what any of those words mean yet but I think I’m headed in the right direction. the troubleshooting section on dav stuff hasn’t helped unfortunately
status update, turns out NextCloud uses SabreDav as its DAV solution (wiki article). I think it’s already installed on my system. I made sure the cache and temp folders had the right permissions and I think that fixed some things but now it’s saying a temporary file is not readable in nextcloud.log:
unable to rename, source directory is not writable : nextcloud-storage/cache/intcreator/uploads/2043559751
I can confirm that nextcloud-storage/cache/intcreator/uploads/ exists and has the correct permissions (at least read and execute up to nextcloud-storage and rwx for www-data for everything under cache. for some reason NextCloud says it doesn’t have access to a file or folder that it supposedly created. after this error I can’t see anything in the uploads folder
good suggestion, I tried that command and it created the file no problem. Nextcloud is running on a different partition than the OS but I can create files no problem so it’s not mounted read only. the cache folder is on the same partition that NextCloud is installed on. also everything NextCloud works except for syncing files over 10 mb.
I did track down the exact lines of code that are coming up over and over in my error log:
the weird thing is this file actually works! it created the test directory as well as the uploads subdirectory with the correct permissions and the user www-data (which I also verified was the user running PHP). because of this I want to rule out Apache config issues and possibly firewall issues. I put the PHP file in my www directory right next to the nextcloud directory, I’m not sure how much closer I can get to Nextcloud without interfering with it.
I’m also getting a related error at this line in the SabreDav library:
I think I may have fixed it. I decided to go with the most easily accessible location for the cache folder, /tmp/nextcloud-cache/ and it worked for at least one test case. I tried for days with two other locations going over permissions again and again and nothing ever worked. hopefully putting the cache files there isn’t an issue.
Edit: yes this fixed it. just to be clear this is the line I changed in /var/www/nextcloud/config/config.php