Logging, Syslog and Log Anaylsys Forums
September 02, 2010, 05:34:59 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
   Home   WIKI BLOG Help Search Recent Topics GoogleTagged Login Register  
Pages: [1]
  Print  
Author Topic: Permission Denied (13) on service start  (Read 2041 times)
agrajag9
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: June 02, 2009, 10:48:25 pm »

I'm using RHEL 5 and when attempting to start syslog-ng (version 2.0.10) it gives me this error:
Code:
Restarting syslog-ng: Error opening configuration file; filename='/etc/syslog-ng/syslog-ng.conf', error='Permission denied (13)'
Then if I check the status, it says it's running.

Here's my /etc/syslog-ng/syslog-ng.conf file:
Code:
# $Id: client-syslog-ng.conf,v 1.4 2005/10/23 18:36:10 jmates Exp $
#
# syslog-ng client configuration: some local logs, in addition to TCP
# logging to central loghost. Listens only on localhost interface;
# requires "logs" user and group on system.
#
# Local logs are stored under /var/log/archive in a syslog-ng specific
# format that includes facility, priority, and a timestamp that includes
# the year.

options {
  log_fifo_size(4096);

  group(logs);
  dir_group(logs);

  create_dirs(yes);
  dir_perm(0750);
  perm(0640);
  use_time_recvd(no);

  use_fqdn(yes);
  chain_hostnames(no);
  keep_hostname(yes);

  stats(3600);
};

source local {
  unix-stream("/dev/log" max_connections(150));
  udp(ip(127.0.0.1) port(514));
  internal();
};

# all logs to loghost via TCP
filter notdebug { level(info...emerg); };
destination loghost { tcp("10.100.50.31" port(514)); };
log { source(local); destination(loghost); };

# emergency to more locations by default
filter emergency { level(emerg); };
destination allusers { usertty("*"); };
log { source(local); filter(emergency); destination(allusers); };

destination d_cons { file("/dev/console"); };
log { source(local); filter(emergency); destination(d_cons); };

# alternate locations for other logs to avoid need to logrotate and HUP
destination d_mesg {
  file( "/var/log/archive/messages/$R_YEAR/$R_MONTH/$R_YEAR-$R_MONTH-$R_DAY"
    template("$ISODATE <$FACILITY.$PRIORITY> $HOST $MSG\n")
    template_escape(no)
  );
};
destination d_mail {
  file( "/var/log/archive/mail/$R_YEAR/$R_MONTH/$R_YEAR-$R_MONTH-$R_DAY"
    template("$ISODATE <$FACILITY.$PRIORITY> $HOST $MSG\n")
    template_escape(no)
  );
};

#filter f_e {
#not(facility(cron) and priority(info));
#};

filter f_filter1 { level(info...emerg) and not facility(mail); };
filter f_filter2 { facility(mail); };

log { source(local); filter(f_filter1); destination(d_mesg); };
log { source(local); filter(f_filter2); destination(d_mail); };
The permissions are -rw-r--r-- 1 root 1962 Jun  1 21:42 syslog-ng.conf
Logged
mutex
Administrator
Newbie
*****
Offline Offline

Posts: 901


View Profile
« Reply #1 on: June 03, 2009, 05:51:38 am »

Do you have app armor running?

Did it work previously, and now doesn't work?
Logged
agrajag9
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #2 on: June 03, 2009, 10:18:50 am »

The system is using SElinux rather than AppArmor, and the config file was copied from another machine where it's working fine.
Logged
mutex
Administrator
Newbie
*****
Offline Offline

Posts: 901


View Profile
« Reply #3 on: June 10, 2009, 12:14:32 pm »

SElinux has app armor that is most likely preventing the file from being read.  Try turning off app armor and restart syslog-ng
Logged
agrajag9
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #4 on: June 10, 2009, 12:43:09 pm »

 Incidentally, an upgrade to version 3 fixed the issue...
Logged
mutex
Administrator
Newbie
*****
Offline Offline

Posts: 901


View Profile
« Reply #5 on: June 10, 2009, 12:48:07 pm »

That is bizarre.  Thanks for coming back and letting me know how it turned out.
Logged
Pages: [1]
  Print  

 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!