rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] User/Group Permissions Question


From: Damon Timm
Subject: Re: [rdiff-backup-users] User/Group Permissions Question
Date: Mon, 23 Feb 2009 13:30:29 -0500

Hi Francisco - thanks for the idea!  See below:

On Mon, Feb 23, 2009 at 1:12 PM, Francisco M. Marzoa Alonso
<address@hidden> wrote:
> You could do:
>
> sudo -u pepe rdiff-backup /backups/pepe /home/pepe
> sudo -u juan rdiff-backup /backups/juan /home/juan
> sudo -u maria rdiff-backup /backups/maria /home/maria
>

My setup is like this:

user1:user1 /home/user1
user2:user2 /home/user2
root:sharedgroup /home/sharedgroup

user1 and user2 are members of sharedgroup and the /home/sharedgroup
folder has g+ws permissions ... this is a shared folder for projects
and the umask is set to 002 so that all files are rw by the group ...
but, when I run:

sudo -u user1 rdiff-backup --preserver-numerical-ids /home/sharedgroup
/mnt/backup/sharedgroup

Inside the backup, the group ID for all the files is set to user1 --
it does preserve the right permissions (That is, g+rw) but it doesn't
keep the right group ID.  If i just run a plain sudo command:

sudo rdiff-backup --preserver-numerical-ids /home/sharedgroup
/mnt/backup/sharedgroup

Then both the ID and the permissions are preserved, but the
rdiff-backup-data is owned by root ... which is the problem I started
with ...

> You can even do it better with an script and the help of "stat" command,
> something in this way:
>
> for DNAME in $(find /home -maxdepth 1 -mindepth 1 -type d);
> do
>    USER=$(stat -c %U $DNAME);
>    sudo -u $USER rdiff-backup $DNAME /backups/$USER;
> done
>
> It's just an idea, may be helpful (or not!) ;-)

Since this is going to be run as a cron item, could I just manually
change the permissions of the "rdiff-backup-data" folder to the
sharedgroup and then add g+r permissions recursively ?

sudo chown -R :sharedgroup rdiff-backup-data
sudo chmod -R g+rx rdiff-backup-data

??

I could put this at the end of the script.

Thanks,
Damon




>
>> I tried using --preserve-numerical-ids ... but, the rdiff-backup-data
>> is still owned by root ...
>>
>> Any ideas?
>>
>> Thanks,
>> Damon
>>
>>
>> _______________________________________________
>> rdiff-backup-users mailing list at address@hidden
>> http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
>> Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
>>
>>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]