Networking Forums

Networking Forums > Computer Networking > Linux Networking > rsync and permissions

Reply
Thread Tools Display Modes

rsync and permissions

 
 
Augustus SFX van Dusen
Guest
Posts: n/a

 
      06-02-2006, 08:52 PM
I am trying to use rsync to create backups on a USB key connected to a
Linux box A. The files being backed up are both local to A, and remote, on
other Linux boxes B, and C running rsync in daemon mode.

The rsync client on A in charge of initiating the backup is launched by
root. The problem that I have encountered is that some files in B and C
are owned by some non-root users, and with read permission set for
the owner of the files alone. The rsync client on A just complains that it
can't read (and copy) such files.

Is it possible to configure the rsync daemons on B and C (and possibly
the rsync client on A) so that this issue can be circumvented? I would
like to stick with the rsync daemon, rather than ssh, for this is for my
home LAN, where the extra security afforded by ssh is not necessary. Also,
changing the permissions of files on B and C is not really an option.

 
Reply With Quote
 
 
 
 
Unruh
Guest
Posts: n/a

 
      06-03-2006, 12:08 AM
Augustus SFX van Dusen <(E-Mail Removed)> writes:

> I am trying to use rsync to create backups on a USB key connected to a
>Linux box A. The files being backed up are both local to A, and remote, on
>other Linux boxes B, and C running rsync in daemon mode.


> The rsync client on A in charge of initiating the backup is launched by
>root. The problem that I have encountered is that some files in B and C
>are owned by some non-root users, and with read permission set for
>the owner of the files alone. The rsync client on A just complains that it
>can't read (and copy) such files.


> Is it possible to configure the rsync daemons on B and C (and possibly
>the rsync client on A) so that this issue can be circumvented? I would
>like to stick with the rsync daemon, rather than ssh, for this is for my
>home LAN, where the extra security afforded by ssh is not necessary. Also,
>changing the permissions of files on B and C is not really an option.


HOw are you going onto the remote system? As root? As user?
Remember that the /etc/rsync.conf file has a "user" option. Make it
"user=0", so that the files can be read. However, when they come over to
your system your system will try to set permissions/ownership, and will not
be able to unless you are root also.

So the best idea is to just have rsync run by root, not by a user.
It would be pretty insecure if a non-root user could use rsync to copy over
files that that user should not be able to read.


 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      06-03-2006, 12:16 AM
On Fri, 02 Jun 2006 20:52:20 GMT, Augustus SFX van Dusen <(E-Mail Removed)> wrote:

> I am trying to use rsync to create backups on a USB key connected to a
>Linux box A. The files being backed up are both local to A, and remote, on
>other Linux boxes B, and C running rsync in daemon mode.
>
> The rsync client on A in charge of initiating the backup is launched by
>root. The problem that I have encountered is that some files in B and C
>are owned by some non-root users, and with read permission set for
>the owner of the files alone. The rsync client on A just complains that it
>can't read (and copy) such files.


Just give the users a common group, with rw perms, that's what groups are
for .

Grant.
--
http://bugsplatter.mine.nu/
 
Reply With Quote
 
Augustus SFX van Dusen
Guest
Posts: n/a

 
      06-03-2006, 02:58 PM
On Sat, 03 Jun 2006 10:16:35 +1000, Grant wrote:

> On Fri, 02 Jun 2006 20:52:20 GMT, Augustus SFX van Dusen
> <(E-Mail Removed)> wrote:
>
>> I am trying to use rsync to create backups on a USB key connected to a
>>Linux box A. The files being backed up are both local to A, and remote,
>>on other Linux boxes B, and C running rsync in daemon mode.
>>
>> The rsync client on A in charge of initiating the backup is launched by
>>root. The problem that I have encountered is that some files in B and C
>>are owned by some non-root users, and with read permission set for the
>>owner of the files alone. The rsync client on A just complains that it
>>can't read (and copy) such files.

>
> Just give the users a common group, with rw perms, that's what groups are
> for .


I don't think that would work, for the files I am talking about are not
accessible in any way by any ordinary users other than their owners.
Thanks for your suggestion though.



 
Reply With Quote
 
Augustus SFX van Dusen
Guest
Posts: n/a

 
      06-03-2006, 03:00 PM
On Sat, 03 Jun 2006 00:08:47 +0000, Unruh wrote:

> Augustus SFX van Dusen <(E-Mail Removed)> writes:
>
>> I am trying to use rsync to create backups on a USB key connected to a
>>Linux box A. The files being backed up are both local to A, and remote,
>>on other Linux boxes B, and C running rsync in daemon mode.

>
>> The rsync client on A in charge of initiating the backup is launched by
>>root. The problem that I have encountered is that some files in B and C
>>are owned by some non-root users, and with read permission set for the
>>owner of the files alone. The rsync client on A just complains that it
>>can't read (and copy) such files.

>
>> Is it possible to configure the rsync daemons on B and C (and possibly
>>the rsync client on A) so that this issue can be circumvented? I would
>>like to stick with the rsync daemon, rather than ssh, for this is for my
>>home LAN, where the extra security afforded by ssh is not necessary.
>>Also, changing the permissions of files on B and C is not really an
>>option.

>
> HOw are you going onto the remote system? As root? As user?


The rsync client is running as root, so that the backups it creates can
faithfully mirror the attributes of the original files.

> Remember that
> the /etc/rsync.conf file has a "user" option. Make it "user=0", so that
> the files can be read.


I'll try that. Thanks.

> However, when they come over to your system your
> system will try to set permissions/ownership, and will not be able to
> unless you are root also.
>
> So the best idea is to just have rsync run by root, not by a user. It
> would be pretty insecure if a non-root user could use rsync to copy over
> files that that user should not be able to read.


That's OK - like I said, this is all within my home LAN.


 
Reply With Quote
 
@(none)
Guest
Posts: n/a

 
      06-14-2006, 03:31 PM
Augustus SFX van Dusen wrote:
> I am trying to use rsync to create backups on a USB key connected to a
> Linux box A. The files being backed up are both local to A, and remote, on
> other Linux boxes B, and C running rsync in daemon mode.
>
> The rsync client on A in charge of initiating the backup is launched by
> root. The problem that I have encountered is that some files in B and C
> are owned by some non-root users, and with read permission set for
> the owner of the files alone. The rsync client on A just complains that it
> can't read (and copy) such files.
>
> Is it possible to configure the rsync daemons on B and C (and possibly
> the rsync client on A) so that this issue can be circumvented? I would
> like to stick with the rsync daemon, rather than ssh, for this is for my
> home LAN, where the extra security afforded by ssh is not necessary. Also,
> changing the permissions of files on B and C is not really an option.
>

Manual way below (I don't use daemon mode). The key is to be root on
sender and receiver.

# rsync -av -e ssh root@B:/ /mnt/USB_KEY/B/
# rsync -av -e ssh root@C:/ /mnt/USB_KEY/C/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can I rsync on UDP? Jagadeesh Linux Networking 19 10-27-2008 02:07 PM
Rsync Mtek Linux Networking 21 07-25-2008 12:59 AM
How to get log file for rsync operation? Does rsync also delete remote files? Goran Ivanic Linux Networking 9 05-05-2008 04:58 PM
question about rsync bahoo Linux Networking 2 03-21-2007 11:54 PM
rsync and ssh authentification Suresh Le Rochus Linux Networking 1 03-19-2006 11:55 PM



1 2 3 4 5 6 7 8 9 10 11