singlefile storage resets file permissions
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 https://github.com/untitaker/python-atomicwrites/issues/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
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.