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
rclone config file changing file permission #1742
Comments
rclone sets the permissions to 0600 when it saves things in the config file (which it will do when tokens are refreshed). The config file contains confidential stuff like access tokens so should be user readable only. |
Is there any way to disable this behavior? |
Not currently - why do you want to? |
Perhaps the best thing would be if rclone only set the permissions on the config file when writing it for the first time. |
Hello, |
Yes using rclone with sudo will leave the config file root owned. You could use a seperate config with the sudo use with |
In my opinion the current rclone behavior is correct, for the security reasons explained by @ncw, I don't see the reason to change, even as an option. |
@marco-m It not only changes the permission but also the owner to the current user. Annoying when you share one rclone config with a system backup script. |
When rclone re-writes the config file it writes the new config as a new file then renames the old one out of the way and renames the new one in to place. Rclone could copy the permissions from the old config file when writing the new one. Copying the ownership is possible to but that isn't easy to do in a cross platform way. |
Maybe it would keep the permission if you rename the old file and copy it in place. |
Rclone uses the procedure it does so that if the disk gets full while writing the config file it doesn't corrupt it (which is a real problem reported by users!). |
I mean if it copies the old file instead of creating a new one it should keep the permissions. |
Hey, just a quick heads-up. |
@userwiths thanks for testing that and writing it up. I'll close this issue :-) |
I have observed this issues in rclone version
v1.37
So I'm having issues with rclone randomly changing file permissions. Every few minutes, the file permissions change to
0600/-rw-------
. I have been experiencing this for several weeks. I have checked all my crontabs and don't use rclone with any scripts. I tried moving my config file from~/.rclone.conf
to~/.config/rclone/rclone.conf
and it is still doing it. I have experienced this on other machines also.The text was updated successfully, but these errors were encountered: