I'm sorry if this has been discussed and I couldn't find it in search. I am running into the following error message when I try to write logs to a different directory than /var/log...
Jul 30 06:25:07 centos5-test rsyslogd: [origin software="rsyslogd" swVersion="2.0.0" x-pid="336"][x-configInfo udpReception="No" udpPort="514" tcpReception="No" tcpPort="0"] restart
Jul 30 06:25:07 centos5-test rsyslogd:/opt/firewall/log/fwlog: Permission denied
Jul 30 06:25:07 centos5-test rsyslogd:last message repeated 2 times
Jul 30 06:25:07 centos5-test kernel: rklogd 2.0.0, log source = /proc/kmsg start
The corresponding section in my rsyslog.conf is as follows:
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
:msg, contains, "[FIREWALL]" |/opt/firewall/log/fwlog
:msg, contains, "ll header" |/opt/firewall/log/fwlog
:msg, contains, "martian source" |/opt/firewall/log/fwlog
I have tried it with and without the pipes and get the same error messages. Rsyslog is running as root, and root has full rwx to the path /opt/firewall/log. I haven't found much on the Internet in general or in the rsyslog docs themselves about writing to log files in non /var/log directories. Any assistance that you could give me would be greatly appreciated...
Thank you.
PS: I'd rather be running a newer version of rsyslog, however, I am trying to stick with pre-compiled binaries for a specific reason, and there are none for RHEL 5/CentOS 5.


