Hi list, I just setup my first rsyncd server and all is working well as far as file syncing goes. However, I am a bit baffled by the fact that some of the log entries in the rsyncd.log file are entered in local time and other are entered in GMT. Here is a sample: file upload: ===========2009/03/01 15:15:49 [22641] connect from UNKNOWN (xxx.xxx.xxx.xxx) 2009/03/01 23:15:49 [22641] rsync to some-module/ from some-name@unknown (xxx.xxx.xxx.xxx) 2009/03/01 23:15:49 [22641] receiving file list 2009/03/01 23:15:49 [22641] unknown xxx.xxx.xxx.xxx some-module (some-name) some-file.txt 2009/03/01 23:15:49 [22641] sent 168 bytes received 6258 bytes total size 37421 =========== file download: =============2009/03/01 15:21:06 [22691] connect from UNKNOWN (xxx.xxx.xxx.xxx) 2009/03/01 23:21:06 [22691] rsync on some-module/some-file.txt from unknown (xxx.xxx.xxx.xxx) 2009/03/01 23:21:06 [22691] building file list 2009/03/01 23:21:06 [22691] unknown xxx.xxx.xxx.xxx some-module () some-file.txt 2009/03/01 23:21:06 [22691] sent 6299 bytes received 54 bytes total size 37421 ============= Note the different (but correct local time) timestamps for "connect" and the others (which are GMT). I would like to log all entries with my local time rather than GMT. Here is what I have setup for logging in my rsyncd.conf: log file = /var/log/rsyncd.log log format = %h %a %m (%u) %f Is there any way to resolve this? Any suggestions would be greatly appreciated! Best regards, Bill
On Sun, 2009-03-01 at 17:21 -0800, Bill Landry wrote:> I just setup my first rsyncd server and all is working well as far as > file syncing goes. However, I am a bit baffled by the fact that some of > the log entries in the rsyncd.log file are entered in local time and > other are entered in GMT.This happens because the chroot done by the rsync daemon prevents glibc from reading /etc/localtime to determine the current timezone. I'm not sure what is the "right" fix for this issue, but you can work around it using the new chroot+chdir mode in rsync >= 3.0.0. E.g., configuration: [some-module] use chroot = true path = /path/to/chroot/./some-module Then copy /etc/localtime to /path/to/chroot/etc/localtime and put the module data in /path/to/chroot/some-module. See also: https://bugzilla.samba.org/show_bug.cgi?id=4402 -- Matt