Failed to obtain lock on file /var/run/nagios.pid: Permission denied

This error is caused by Nagios not having access to the folder where it should save it`s PID file. You can change the path for the PID file (and then also fixing the issue) by editing your nagios.conf (usually /etc/nagios/nagios.conf).

Locate the lock_file setting:

lock_file=/var/run

And change it to another path, like for example /tmp.

Start up Nagios again and it should be much happier :)

This entry was posted in Linux, Software and tagged , , . Bookmark the permalink.

2 Responses to Failed to obtain lock on file /var/run/nagios.pid: Permission denied

  1. Sake says:

    mkdir /var/run/nagios
    chown nagios:nagios /var/run/nagios

    lock_file=/var/run/nagios

    And report a bug for your distro :)

  2. audiodidact says:

    simple fix, thank you sirs :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">