0

I'm trying to get a couple of programs to restart via cron every x hours (like for example syslog-ng using "/etc/init.d/syslog-ng restart"). However, the following always gets returned:

Stopping syslog-ng: [FAILED]
rm: cannot remove `/var/lock/subsys/syslog-ng': Permission denied
Starting syslog-ng: Error opening file for reading; filename='/proc/kmsg', error='Permission denied (13)'
Error initializing source driver; source='s_sys'
[FAILED]

Which file permissions do I need to change in order to be able to restart the programs with cron?

Thanks a lot.

timetofly
  • 215

1 Answers1

0

Which user's crontab are you running this from? If it is root's crontab, no additional permissions should be needed. If running it from a non-privileged user's crontab, then you'll need to grant that user permission to run the desired command using sudo.

EEAA
  • 110,608