[Dirvish] dirvish-expire trouble with read only vault directories ?

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Fri May 12 10:56:20 UTC 2006


Paul Slootman wrote:
> On Thu 11 May 2006, Tony wrote:
> 
>> I've had divish (v1.2.1) working for over a month now, doing daily 
>> backups from my various systems at home.
>> 
>> However, when dirvish-expire runs from crontab, it emails me a huge
>> message with a whole lot of lines that say basically :
>> 
>> rm: cannot remove `/backup/pictures/20060328/tree/image001.jpg':
Permission denied
>> 
>> A quick look at the permissions for the ./tree directory shows :
dr-xr-xr-x.

But you don't say who the owner is? Which can depend on your 
rsync/dirvish settings.

>> I'm running both dirvish and dirvish-expire as a normal user (not
root) so it appears dirvish is setting the directory as read-only and
dirvish-expire cannot deal with that.

You don't say how dirvish is set up to run rsync. Is rsync running as 
the normal user or as some other user via a daemon?

If the files belong to the same user that is running dirvish-expire then 
I'd expect it to work. If the files belong to some other user (which I 
think could only happen if they were created by an rsync daemon running 
as that other user or as root?) then it won't work. It would be a basic 
failure of filesystem security if it did! Somehow, the entity doing the 
expiry needs to have permission to delete the files.

> Hmm, I don't know what other gotchas you may run into when not
> running dirvish as root...
> 
>> Do I have to run dirvish-expire as root to fix this ? I'd rather
>> not do that.

You certainly need to run it as a user who has permission to alter the 
files.

> You could use a post-server command to chmod the "tree" directory
> after the backup run is complete, so that later dirvish-expires will
> be successful.

But that would cause a problem with restores, if ever required.

> In the meantime you could do "chmod +w */*/tree" from the bank 
> directory...

I don't think you need write permission to delete files? You need 
execute permission on the directory above? But I think the issue is 
essentially a question of ownership, not permissions.

Cheers, Dave


More information about the Dirvish mailing list