If you think that it might be a selinux problem (if  it works with
'setenable 0' then it's probably selinux), You might need to allow the
following:

semanage fcontext -a -f "" -s system_u -t var_log_t "/root/opt(/.*)?"

That sets the proper type.


On Tue, Sep 10, 2013 at 2:54 PM, Rainer Gerhards
<[email protected]> wrote:
> On Tue, Sep 10, 2013 at 3:49 PM, Hanish Bansal <
> [email protected]> wrote:
>
>> Hi
>>
>> I have configured rsyslog on my centos machine.
>>
>> In rsyslog.conf file i defined:
>>
>> $ModLoad imudp
>> $UDPServerRun 514
>>
>>
>> local1.* /var/log/local1.log
>>
>>
>> I am able to get all logs of facility level "local1" in file
>> /var/log/local1.log. Now i want to change this path to have log file
>> somewhere else. For example i want to have log file at
>> /root/opt/local1.log.
>>
>> In rsyslog.conf i changed configuration to:
>>
>> local1.* /root/opt/local1.log
>>
>>
>> But Its not working. I am able to get logs only at /var/log/* location.
>>
>>
> This strongly smells like a SELinux policy issue.
>
> Rainer
>
>> How to configure if i want to maintain logs at some other location other
>> than /var/log/* location ?
>>
>> --
>> *Thanks & Regards*
>> *Hanish Bansal*
>> _______________________________________________
>> rsyslog mailing list
>> http://lists.adiscon.net/mailman/listinfo/rsyslog
>> http://www.rsyslog.com/professional-services/
>> What's up with rsyslog? Follow https://twitter.com/rgerhards
>> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
>> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
>> DON'T LIKE THAT.
>>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T 
> LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to