[Bug]: Permission denied for the creation of a new file inside a read-only permission folder
⚠️ Before submitting, please verify the following: ⚠️
- [X] This is a bug, not a question or a configuration issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server and Desktop Client are up to date. See Server Maintenance and Release Schedule and Desktop Releases for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct
Bug description
When someone with read-write permission of a folder create a new file inside it and I try to synchronise again the folder whereas I only have read permission, there is an error in the synchronisation "Permission denied".
Steps to reproduce
- User 1 creates a folder with read-write permissions for them and read-only permission for user 2.
- User 2 synchronises the folder.
- User 1 creates a file inside the folder.
- User 2 tries to synchronise the folder again a gets an error permission denied.
Expected behavior
The file is created inside the folder. The permissions are set correctly for the folder (read-only) and for the file (read-only too).
Which files are affected by this bug
All files created inside a read-only permission folder
Operating system
Linux
Which version of the operating system you are running.
Fedora Linux 39
Package
Appimage
Nextcloud Server version
29.0.2.2
Nextcloud Desktop Client version
3.13.1
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 3.4.2 to 3.4.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
Are you using an external user-backend?
- [ ] Default internal user-backend
- [X] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Nextcloud Server logs
No response
Additional info
I did not noticed this bug in #6796 which was happening when a read-only permission file was modified but is related to the way permission are managed by Nextcloud Desktop for Linux. The branch #6839 did not fix the problem (as it happens with version 3.13.1).
Same here with server 27.1.11, Default internal user-backend, and Arch Linux / Manjaro client packages. Versions 3.13.0-3.13.1 are broken.
Verison 3.12.3 is fine, downgraded to it.
Probably related: A sub-folder with files in an already synced read-only folder got deleted. The files are gone, but the folders cannot be deleted.
Windows 11, Nextcloud Client 3.13.2, Server 28.0.6
We have the same problem as reported by abrain: On a groupfolder, a sub-folder with files in an already synced read-only folder gets deleted. The files are gone, but the folders cannot be deleted. The workaround is to manually delete the folders on the PCs, but this is not feasible when there are a few tens of users.
Windows 10 or 11, Nextcloud Server 29.0.3, Nextcloud Client 3.13.2
Can confirm the error with following scenario:
- User 1 shares a folder with files inside to User 2 (only read permissions)
- The folder and files inside are getting synchronized to the computer of User 2.
- User 1 deletes the folder.
- The client on User 2's computer tries to delete the folder but fails. (the files are deleted successfully)
- User 2 can't move, delete, modify the folder or the parent folder.
The only way to get rid of the folder is that User 1 restores the deleted folder and changes the permissions of User 2 that writing is allowed too.
Here is some information
[General]
clientVersion=3.13.23.12-Win64 (build 20240708)
isVfsEnabled=false
overrideLocalDir=
overrideServerUrl=
showInExplorerNavigationPane=true
moveToTrash=false
The Server Version ist 28.0.8
I have been able to reproduce the following with server 27.1.3, desktop client 3.13.2 on linux, groupfolder 15.3.8:
- I created a groupfolder that can be only administered by the 'admin' group, and it has read only permissions for a group called 'staff'
- admin then adds files to the folder
- staff user syncs it (Linux)
- admin adds another file
- staff users syncs the file
- no errors
- admin removes one file
- staff users syncs the file
- error "permission denied"
So the only actions that throws an error is delete. On Windows with desktop client 3.13.0, all file actions worked as expected.
User 1 shares a folder with files inside to User 2 (only read permissions)
The folder and files inside are getting synchronized to the computer of User 2.
User 1 deletes the folder.
The client on User 2's computer tries to delete the folder but fails. (the files are deleted successfully)
User 2 can't move, delete, modify the folder or the parent folder.
I could not reproduce any errors with this scenario (a simple shared folder).
A sub-folder with files in an already synced read-only folder got deleted. The files are gone, but the folders cannot be deleted.
I also tried with sub folders on Linux and Windows. On Linux I got the same error as with files and in Windows it worked. It was with Windows 10. And I just had upgraded to 3.13.2 this time.
I also try creating the files/folder in the web and via another client. The effect was the same: only Linux throws the 'permission denied' error.
Same here on my Kali-Linux... (Nextcloud Desktop-Client 3.13.2 on local EXT4-Filesystem) A workaround is to manually give the local user write access to the corresponding directory in the local file system. The sync client notices this directly and can now write the file to be synchronized. Immediately afterwards, however, the sync client automatically revokes its write permissions, so that subsequent synchronizations fail again.
I have the same problem here in the company. MacOS with Nextcloud Client 3.13.2 We have several group folders in which only certain users are allowed to write. If something is changed in these folders, all other users get "Permission Denied" errors. Files that are in read-only group folders are created locally with -r--r--r--. If someone changes files, the Nextcloud client can no longer change the files.
I have the same issue but with a folder created by myself for myself. On my desktop, I created a folder named Backup within my Nextcloud directory. On my Android phone, I created a sub folder for Signal backups within that folder (using the same Nextcloud user though). I can sync Signal fine from my phone to that folder in Nextcloud, but back on my desktop I get the permission denied error from Nextcloud Desktop (while still being able to access the backed up files without issues) resulting in a permanent red exclamation mark in my taskbar. It's basically a cosmetic issue for me but still annoying.
I have the same issue but with a folder created by myself for myself. On my desktop, I created a folder named Backup within my Nextcloud directory. On my Android phone, I created a sub folder for Signal backups within that folder (using the same Nextcloud user though). I can sync Signal fine from my phone to that folder in Nextcloud, but back on my desktop I get the permission denied error from Nextcloud Desktop (while still being able to access the backed up files without issues) resulting in a permanent red exclamation mark in my taskbar. It's basically a cosmetic issue for me but still annoying.
I think it is a different issue so you can open another issue though. I have seen that some improvements have been made for the 3.15 release regarding the r/w permissions but I am still unable to test 3.14 and 3.15 clients because of issue https://github.com/nextcloud/desktop/issues/7465.
The last activity here was some time ago. Any updates on this issue? I'm using version 3.15.3 and am still experiencing this problem.
Hello,
the client was enhanced significantly since the opening of this ticket. You can help us with a retest. If you are still encountering issues, please get back to us