-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Folder permissions are changed during synchronization (3.13.1 & 3.13.2 & 3.13.3) #6863
Comments
I am experiencing exactly the same. Maybe this is caused by the the following change: where |
Yes, I can confirm this behavior. That one just messed up some of my directory and file permissions. |
This comment was marked as duplicate.
This comment was marked as duplicate.
I have the same issue on Arch. When I create new folders locally or on the instance they change permissions to 777. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This should really get attention as soon as possible. |
Same Problem on 3.13.2 with folder with local permissions like : Nextcloud can't create some new folder or file in "NIR 2024" or "NIR-Instances" Nextcloud-desktop 3.13.2. |
+1 ubuntu 22.04 and 24.04. I've rolled back to 3.13.0 |
This comment was marked as duplicate.
This comment was marked as duplicate.
Since the bug is currently not being addressed, is it advisable / what is the best way to downgrade to 3.13.0 on macOS? |
It is being addressed. |
I have the same problem and I reinforced it, publishing the problem again, but it seems that they are not correcting it, I am going to downgrade the application, because I synchronize my home, and there was a change in permissions. Does anyone know which version doesn't have this problem? |
|
3.13.0 is the last one that worked fine for me. 3.13.1 and 3.13.2 are broken. |
I installed 3.13.0 and it's fine, I even set it to ignore updates. Now the question is, why are they ignoring this bug?😐 |
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
It is taking some time, for sure, but the PR(#6949) got a reviewer so it's certainly being noticed. |
I tested using nextcloud 28.0.8.1 and 2x desktop-client 3.12.2
Note: only write permission is set for others Second scenario (only one client):
Note: existing folders only get write permission for others, new folders get Same behavior in group folders. |
If Nextcloud really needs to make a file writable, then the umask setting should be used. E.g. if umask is 0022, the Nextcloud must not set a file writable to group and would. |
@ltoenning wrote:
During debugging I found another place, where permissions are changed to user, group and would writable: src/common/filesystembase.cpp:
|
I don't understand how they are ignoring something serious like this. Messing with file permissions, making everything executable is regrettable and serious, even more so for me who uses $HOME to synchronize, I'm using the old version that doesn't mess up and I got stuck on it. |
This should be a security incident IMO. |
How is this security issue open for more than seven weeks now without a fix? Complete lack of security culture. |
Today's 3.13.3 doesn't seem to fix it (on macOS at least). |
It would be awesome if Nextcloud started caring about file permissions in general. 7 years later after I reported nextcloud/server#6725, I am still running complicated hack scripts periodically, as file permissions are out of sync across machines, by design. |
Has anyone started the process of getting a CVE for this? |
I've requested one, but haven't heard anything about it. |
I looked into this issue and the culprit seems to be commit 82197c7. Before this commit setFolderPermissions used to only set owner_write on the second evaluation of the passed in permissions. This commit changed the behaviour to set writePerms for owner, group and other. And as the options are options add. The folder will be world writable. I suggest reversing that change with the applied patch. |
That sounds like the correct way. As per our security policy security and privacy related issues and incidents should be reported using our HackerOne Program which is monitored even outside of office hours. That's much more helpful than a report under almost 1k issues. I did that now and escalated it internally directly to the respective team. It should be picked up soon and an official comment should be coming afterwards. |
very sorry as there was disagreement over the fix and I wrongly evaluated the importance of the fix |
Can you reach out again and get the CVE reworded as the issue only affects directories not files? And we'd really appreciate if such things are not done without involvement from our security team. All our SAs are available and published in https://github.com/nextcloud/security-advisories |
This comment was marked as off-topic.
This comment was marked as off-topic.
Noted, & I have reached out to have the wording corrected on the CVE reference. Whilst issues are being triaged in future, it may be helpful to signpost users in relation to your preferred security procedure & contacts, so that users can be more informed and engage in your preferred security process. |
Bug description
After updating from 3.13.0 to 3.13.1, this error occurs.
If a file is updated in an existing folder, the permissions are modified for all folders directly above it up to the sync root folder, the folders become writable for groups and others.
Another way is to simply create a new folder for example in the sync root folder. Directly after creation, the folder then has the following rights, for example
drwx------ 2 user user 4096 Jun 30 19:14 test
. After the folder was synchronized, the rights have now changed, in this exampledrwx-w--w- 2 user user 4096 Jun 30 19:14 test
.There are no log entries for either the server or the client.
After downgrading from 3.13.1 to 3.13.0, this error no longer occurs.
Steps to reproduce
Expected behavior
After the synchronization no folder permissions are changed.
Which files are affected by this bug
custom created test folder
Operating system
Linux & macOS
Which version of the operating system you are running.
Arch Linux & Debian 12
Package
Distro package manager & AppImage
Nextcloud Server version
29.0.3
Nextcloud Desktop Client version
3.13.1 & 3.13.2 & 3.12.3
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?
Nextcloud Server logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: