Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco)
2006-Feb-22 18:24 UTC
Rsyncd log file permission
Hi I am wondering if there is any way to change the file permission of "rsync.log" and "rsyncd.lock" via rsyncd.conf. Most likely the "lock" file is not possible, but maybe the other file is possible. The reason I am asking is because if I UserA runs rsync, then UserB won't be able to write to rsync.log file since its owned by UserA and readable only to UserB. So I'm trying to make it writable by all when performing a sync. Is it possible to have.... log file = /logs/cdersync/$USER.rsync.log lock file = /logs/$USER.rsyncd.lock ??>From current rsyncd.conflog file = /logs/cdersync/rsync.log lock file = /logs/rsyncd.lock -rw-r--r-- 1 UserA GroupA 10399049 Feb 16 17:55 rsync.log -rw------- 1 UserA GroupA 0 Dec 20 10:44 rsyncd.lock
On Wed, Feb 22, 2006 at 10:13:32AM -0800, Jonathan Chen -X wrote:> Hi I am wondering if there is any way to change the file permission of > "rsync.log" and "rsyncd.lock" via rsyncd.conf.No, but you can preset the permissions to anything you like. After all, rsync will just append lines to an existing file. So, if you need a log file that can be appended by multiple people, make it group-writable by both users. That said, I'm at a bit of a loss as to why this is necessary. If you aren't leaving the daemon running, why doesn't each user just use a customized rsyncd.conf file to start the daemon? ..wayne..
Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco)
2006-Feb-24 19:17 UTC
Rsyncd log file permission
Thanks! That solution is fine too. Rsyncd is run as a root daemon while syncing will be performed by a regular user.> -----Original Message----- > From: Wayne Davison [mailto:wayned@samba.org] > Sent: Thursday, February 23, 2006 11:18 PM > To: Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco) > Cc: rsync@lists.samba.org > Subject: Re: Rsyncd log file permission > > On Wed, Feb 22, 2006 at 10:13:32AM -0800, Jonathan Chen -X wrote: > > Hi I am wondering if there is any way to change the file > permission of > > "rsync.log" and "rsyncd.lock" via rsyncd.conf. > > No, but you can preset the permissions to anything you like. > After all, rsync will just append lines to an existing file. > So, if you need a log file that can be appended by multiple > people, make it group-writable by both users. > > That said, I'm at a bit of a loss as to why this is > necessary. If you aren't leaving the daemon running, why > doesn't each user just use a customized rsyncd.conf file to > start the daemon? > > ..wayne.. >