Link to home
Start Free TrialLog in
Avatar of jasonslogan
jasonslogan

asked on

rsyncd - can't set "log file" to module

This works on fedora 7 but it's not on centos 5.5.

I've setup an rsync server.  I have "log file" in the global parameters of rsyncd.conf and "log file" in the module section also.  My main log "/var/log/rsync.log" keeps saying "Global parameter log file found in service section!"

I've validated the path to the module log file.  There is nothing there. I even did a touch rsync_pas.log first with the same permissions that the /var/log/rsync.log had but still it doesn't log anything to that file.

The files do backup fine but the logging is in the /var/log/rsync.log instead of where I've specified for that module.

Any help would be greatly appreciated...

rsyncd.conf:

gid = nobody
uid = 0
max connections = 100
timeout = 300
use chroot = true
log file = /var/log/rsync.log

[pas]
        path = /rsyncd_backup/pas
        read only = false
        list = no
        gid = nobody
        uid = 0
        auth users = jason
        secrets file = /etc/rsyncd.secrets
        log file = /rsyncd_backup/logs/rsync_pas.log
Avatar of medvedd
medvedd

I have a suspicion that global settings override settings for modules.
Try to remove "log file = /var/log/rsync.log" from global section and see how it'll go.
If it will not help, you can use some script to filter messages for different modules,
like this:

http://rsync.samba.org/ftp/unpacked/rsync/support/logfilter

Avatar of jasonslogan

ASKER

I tried that first but then it pushed the logs to the local syslog server.  According to the link above you can use both. You can have authentication logs and so forth but logging the modules can be done individually.
Check the versions of rsync.  the CentOS version might be slightly different.  Does "man rsyncd.conf" on the CentOS server say it's a module parameter or only global parameter?
ASKER CERTIFIED SOLUTION
Avatar of Joshua_Peters
Joshua_Peters
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
man rsyncd.conf does say you can put "log file" in the module but after updating with Joshua's suggestion it worked fine.  The fedora 7 version 2.6.9 and the centos 5.5 version was 2.6.8.  Now I am running 3.0.7...
This answer was the solution to my problem not just commenting.