mirrorring mailserver & permission denied
dwd at bell-labs.com
Wed Nov 14 03:29:50 EST 2001
On Tue, Nov 13, 2001 at 09:52:48AM +0800, Michael P. Carel wrote:
> Hi to all,
> Im just a RSYNC newbie, i've tried to set this up and evaluate. Im trying to
> create a mirror of my mail server but what i observed during my test of this
> rsync the ownership are being changed(501) when it was downloaded to my
> mirror.I have the following test config with my server:
> mail server: rsyncd.conf(192.168.1.36):
> motd file = /etc/rsyncd.motd
> log file = /var/log/rsyncd.log
> pid file = /var/run/rsyncd.pid
> lock file = /var/run/rsync.lock
> path = /home/test
> comment = My Test File
> read only = yes
> list = yes
> hosts allow = 192.168.1.17/32
> This is my commandline in my mirror machine transferring file to /home/test/
> #rsync -avz 192.168.1.36::test /home/test
> Any idea whats wrong with my work? i just whant to preserved all the
> ownership and permissions on the mail server upon transferring on the mirror
I'm assuming you're running both sides as root, right? Do the user id
numbers match the names on both sides? That's not necessarily needed, but
it makes it easier.
Here's something from the rsync man page, "cleverly" hidden in the section
on -o which is implied by -a:
This option causes rsync to update the remote
owner of the file to be the same as the local
owner. This is only available to the super-user.
Note that if the source system is a daemon using
chroot, the --numeric-ids option is implied because
the source system cannot get access to the user-
Thus if you don't have matching user id's on the two sides, you either need
to not use daemon mode or you need to use the option "use chroot = no" in
the daemon (which has its own risks, see rsyncd.conf man page). I recommend
not using daemon mode if you can get away without it, use rsh or ssh instead.
n Tue, Nov 13, 2001 at 02:26:19PM +0800, Michael P. Carel wrote:
> Im mirrorring my mail server, but upon executing the command on the remote
> host i can see some permission denied upon opening the users home directory,
> and when it happend the remote host doesnt have the proper ownership from
> the transferred data.
See the "uid" option rsyncd.conf. It defaults to "nobody", and you'll want
it to be "root".
On Tue, Nov 13, 2001 at 04:18:05PM +0800, Michael P. Carel wrote:
> Subject: forced copying of non readable file
> Hi Tridge,
> Sorry for mailing directly cause i have'nt receive any responses from my
> previous questions from your mailing list.
You're likely to get a faster response on the mailing list than from Tridge.
Please give us a little time.
- Dave Dykstra
More information about the rsync