I’ve run into troubles with permission settings:
In my Nextcloud (desktop) client, I get loads of errors that read “Not allowed because you don’t have permission to add subfolders to that folder” refers to directories that do have write permissions (755) and are owned by user www-data:www-data. The directory is on an external drive (mounted to /mnt/usb/). I set
/mnt/usb/ - I don’t know what else to try… can anyone help me out, please?
What about internal nextcloud permissions? Is it possible that the user is not allowed to write to a share/groupfolder?
What do you mean by “internal nextcloud permissions” exactly? You mean on my client where the data is supposed to be uploaded from?
How do I check/verify?
The target folder you are trying to write to, is it a folder originally created by the user used for authentication of the sync client or is it shared by another user or is it a groupfolder (created by groupfolders app)?
With nextcloud internal permissions i mean permissions set on a share (share, create, edit, delete):
If you are using groupfolders app, the same can be set in settings/groupfolders.
EDIT: Can you create the folder in the web GUI?
Ah, even on the webUI it says You don’t have permission to upload or create files here. So I created a testdirectory through the webUI and checked how it appears on the shell and I confirm, it has the same user (www-data) and permissions (drwxr-xr-x, 755) like the other dirs. Weird…
Are you using the external storage app? Is it possible that the read only option (in the 3-dot menu) is checked?
EDIT: Is there anything helpful in the nextcloud.log file?
I’ve been running
$ sudo -u www-data php ./occ files:scan --all /var/www/html/nextcloud/ to rescan all my files, it hasn’t finished yet (takes forever) but the You don’t have permission to upload or create files here as reported before does not appear anymore in that same directory… so I’m carefully optimistic that this has resolved my issue…
I haven’t chosen to Force resync now yet as I’d rather let the scan finish first, I’ll report on success or failure once it completed.
Okay, the rescan finally finished with these stats:
$ sudo -u www-data php ./occ files:scan --all /var/www/html/nextcloud/
Starting scan for user 1 out of 1 (stdcerr)
| Folders | Files | Elapsed time |
| 1016 | 19356 | 00:53:32 |
My Nextcloud client started to resync automatically (without the need to click Force resync now) and I’m pleased to report that it is now successfully able to create/write to the directories/files of concern from before!