[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Duplicity-talk] Restoring regular files with sticky bit
From: |
Peter Schuller |
Subject: |
[Duplicity-talk] Restoring regular files with sticky bit |
Date: |
Tue, 23 Dec 2008 00:23:38 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
so I encountered a situation where duplicity is unable to restore a
backed up file because the source file was a regular file with the
sticky bit set. On FreeBSD, a non-root user cannot set a sticky but on
a regular file. Presumably the sticky bit was originally set as a
result of the operation being performed by root (perhaps during an
rsync -avWP).
The question is how one would want duplicity to handle it. I
definitely think it should do something sensible, or allow for it,
since you do not want to have to sort this out on the spot.
A few possibilities:
* Introduce a --no-sticky-on-regular-files (or similar) switch which
would disable attempts to set the sticky bit during restores.
* Automatically re-try a chmod without the sticky bit if a chmod ever
fails with the sticky bit being requested.
* Never attempt to preserve the sticky bit.
I think I favor the first possibility because it would not affect
preservation by default while allowing users a way out when having
this problem. Perhaps try to give the user a hint that this may be the
problem when os.chmod fails.
I don't like disabling preservation alltogether since the sticky bit
might be there for a reason :) The re-try does not feel good either
because you can imagine situations where a file will be incorrectly
restored as a result of some transient error that made the chmod fail,
so the process becomes non-determinstic. Even without that problem, I
don't like "silent non-preservation".
Any opinions?
--
/ Peter Schuller
PGP userID: 0xE9758B7D or 'Peter Schuller <address@hidden>'
Key retrieval: Send an E-Mail to address@hidden
E-Mail: address@hidden Web: http://www.scode.org
pgprqL7BCfXow.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Duplicity-talk] Restoring regular files with sticky bit,
Peter Schuller <=