[rsyslog-notify] Forum Thread: rsyslog7 - query on writting log files with diff owner/group - (Mode 'post')
noreply at adiscon.com
noreply at adiscon.com
Thu Aug 11 19:50:06 CEST 2016
User: lakshman237
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26873#p26873
Message:
----------
Greetings,
I am running rsyslog7.4.10 on RHEL 6.7 as root user. The daemon runs
fine and I can send messages via netcat on UDP/514.
my config file in /etc/rsyslog.d/ has
template (name="rsyslog-fmt" type="string"
string="%TIMESTAMP% %HOSTNAME%
%syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
)
if $msg contains "%ASA-" then { action (type="omfile"
file="/app/logs/mylogs/cisco-firewall.log" template="rsyslog-fmt")
stop }
The file gets generated, but it is owned by root:root. The /app/logs/mylogs
folder is owned by user 'myusr:mygroup'.
what do I need in the config to tell that file is created as
'myusr:mygroup' previleges and not as root?
Any help is appreciated.
Thanks
Laks
More information about the rsyslog-notify
mailing list