[darcs-devel] [issue2086] darcs does not preserve _darcs/index permissions

Ben Franksen ben.franksen at online.de
Thu Jul 2 16:57:51 UTC 2015


Ganesh Sittampalam wrote:
> Ganesh Sittampalam <ganesh at earth.li> added the comment:
> 
> The test for this fails on my machine as-is, because my default
> umask is 022. If I change it to 002, or add an explicit --umask 002
> to the second record command in the test, then it passes.

I see, false positive for you, as I thought.

> Technically speaking a umask is only supposed to affect the
> permissions for newly-created files, so it may be that the original
> reporters are expecting to be able to change the permissions on
> _darcs/index after creation to something that conflicts with their
> umask - e.g. 0664 with a umask of 022 - and have that be preserved.
> In practice that doesn't work because I think darcs recreates the
> index file when it updates it.

Yes, this is most probably the scenario.

> If anyone cares about that scenario please reopen this bug for
> discussion otherwise I'm going to change the test to be robust
> against the runner's umask and leave the bug resolved.

I agree completely, except I think "wont-fix" would be more honest. While 
you could use --umask (even use a default line 'ALL umask 002' now that we 
support option arguments in the defaults file), this is most probably not 
what the user wanted. Most probably he wanted others to be able to read his 
repo, but not change it; but still wants them to be able to use (and, I 
guess, also update) the patch index for speed. But if we re-create the index 
(probably for reasons of atomicity), then only the directory permissions 
decide about being allowed to do so or not. And anyway this is a different 
discussion/issue.

Cheers
Ben

> ----------
> status: unknown -> resolved
> 
> __________________________________
> Darcs bug tracker <bugs at darcs.net>
> <http://bugs.darcs.net/issue2086>
> __________________________________
-- 
"Make it so they have to reboot after every typo." ― Scott Adams




More information about the darcs-devel mailing list