Syslog-ng - File permission error in suse Linux

I am getting the below given error when I try to forward certain log files using syslog-ng in Suse Linux

Starting syslog servicesError opening file for reading; filename='/tmp/app.log', error='Permission denied (13)' 

my conf file - Source definition seems to be ok

source app { file("/tmp/app.log"); }; 

I went through similar posts and dont see any problems with my steps.The weird part is that the file is owned by root and when i run syslog-ng as root it gives read permission error

Am I missing anything?

1 Answer

This problem is caused because of AppArmor linux security module. Solution to this problem is mentioned in attached thread. syslog-ng read file permission denied

Here are steps I followed.

  1. Open /etc/apparmor.d/sbin.syslong-ng
  2. Add /opt/xxx/logs/* rw, line anywhere. rw below means allow read & write access. Change your directory appropriately.
  3. Run apparmor_parser -r /etc/apparmor.d/sbin.syslong-ng to set new rules.
  4. Restart syslog-ng using service command or any other way you have set up.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like