pimutils / pimutils/vdirsyncer

singlefile storage resets file permissions

Open
#1,133 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the singlefile storage write path and its use of python-atomicwrites, then reproduce the issue by changing a generated file to 0644 and invoking vdirsyncer again. Check the relevant storage tests and add coverage for the expected permissions behavior; done means a subsequent invocation no longer resets the file permissions unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.