rsyncd.conf
Axel Luttgens
luttgens at fusl.ac.be
Tue Apr 1 01:09:20 PDT 2008
Le 30 mars 08 à 19:01, LuKreme a écrit :
> I have the following in rsyncd.conf (on 'server'):
>
> [backup]
> path = /backup/
> comment = Backup
> readonly = no
> auth users = root
> secrets file = /usr/local/etc/rsyncd.secrets
>
> I tried to connect to it from www2
>
> rsync -av --password-file=/var/rsync.passwd --link-
> dest=server::backup/www2 / server::backup/www2.daily.0
>
> and get the following error:
>
> building file list ... done
> rsync: mkdir "www2.daily.0" (in backup) failed: Permission denied (13)
> rsync error: error in file IO (code 11) at main.c(529)
> [receiver=2.6.9]
> rsync: connection unexpectedly closed (4 bytes received so far)
> [sender]
>
> Since the auth user for the rsync is 'root' why am I getting a
> permission failure?
>
> And even though the current www2 folder is owned by root (in fact,
> has the same permissions as /backup), I AM able to run the following
> command with no error:
>
> rsync -av --password-file=/var/rsync.passwd / server::backup/www2
>
> $ ls -lsa /backup/
> 2 drwxr-xr-x 13 root wheel 512 Mar 30 10:33 .
> 2 drwxr-xr-x 24 root wheel 1024 Feb 16 13:58 ..
> 2 drwxr-xr-x 21 root wheel 512 Jun 10 2007 www2
So, anybody may read/traverse folder www2, but only a process running
as root may write within it.
In the above, assuming you are running your rsync commands as root,
you have authenticated as an rsync user named "root" against the rsync
server.
An rsync user is just a name defined in the server's secrets file, and
has no relationship to system users.
So, the question is: does the rsync server process run as root, ie
with UID 0, while handling the client's request?
For this to happen, rsync must be launched as root and must be
instructed to stay running as root (not to switch to another user).
Perhaps do you just need to add this line to the [backup] section:
uid = 0
provided the daemon itself is launched as root.
HTH,
Axel
More information about the MacOSX-admin
mailing list