Skip to content
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

singlefile storage resets file permissions #1133

Open
vwegert opened this issue Aug 27, 2024 · 1 comment
Open

singlefile storage resets file permissions #1133

vwegert opened this issue Aug 27, 2024 · 1 comment

Comments

@vwegert
Copy link

vwegert commented Aug 27, 2024

I'm using vdirsyncer to create a local cache of a number of remote storages. vdirsyncer creates the singlefile storage files with the permissions 0600. For my use case, the result file needs to be readable by other OS users, i.e. with permissions 0644. The problem is that after changing the permissions manually on the command line, every subsequent invocation of vdirsyncer will reset the permissions to 0600.

This appears to happen due to the way python-atomicwrites implemented the operation, see untitaker/python-atomicwrites#42. The proposed workaround appears to be to leave resetting the permissions to the caller (and since the repository has been archived two years ago, that appears to be unlinkely to change).

  • vdirsyncer version 0.19.2
  • Python version 3.12.3
  • operating system Gentoo Linux
@WhyNotHugo
Copy link
Member

Files should probably be created as 0666. If someone wants stricter permissions, they can set the umask(2) before running vdirsyncer.

atomicwrites is unmaintained, and its readme indicates:

Python 3 has os.replace and os.rename which probably do well enough of a job for most usecases.

I think we'd need to re-implement it in-tree before we can make any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants