naemon-core icon indicating copy to clipboard operation
naemon-core copied to clipboard

Error: Unable to write to temp_path ('/var/cache/naemon') - Permission denied

Open mgadi opened this issue 9 years ago • 12 comments

Debian 8 Jessie - amd64

Thruk 2.08
Naemon Core 1.0.5-pkg

Hi, I am getting this error on the web page, when i try to use the "Check your configuration changes" box :

Total Errors: 1 ... Error: Unable to write to temp_path ('/var/cache/naemon') - Permission denied

There's no error with the command line /etc/init.d/naemon configtest

Total Warnings: 0 Total Errors: 0

I have made no change at all !!!

mgadi avatar Sep 13 '16 12:09 mgadi

I find that updating naemon sometimes changes the permissions on the folder. What is the current permissions set on the /var/cache/naemon folder?

Regards

Jens

Hyllegaard avatar Sep 14 '16 08:09 Hyllegaard

This is a fresh install from scratch. This is the permission set by the installer :

permission-cache-naemon

mgadi avatar Sep 14 '16 08:09 mgadi

Unfortunately the permissions for the naemon folder is not shown in your screenshot. Please append -a to your ll command so we get the permissions for . also

Hyllegaard avatar Sep 14 '16 08:09 Hyllegaard

All right ! Here it is :

permission-cache-naemon-2

mgadi avatar Sep 14 '16 08:09 mgadi

Ok. I guess the problem is that the problem is as follows: Thruk is being run as www-data user and therefor does not have write access to the folder.

So change the permissions on the folder to +w for others. chmod o+w /var/cache/naemon

I have to do this whenever I update naemon. Should probably file an issue on that :smile:

So I suggest that this issue is left open, until the source problem is fixed. My answer is only a temporary fix.

Hyllegaard avatar Sep 14 '16 09:09 Hyllegaard

Ok i've change the permissions on the folder, as you say. It does fix nothing !

mgadi avatar Sep 14 '16 10:09 mgadi

Can you show me the resulting permissions?

Hyllegaard avatar Sep 14 '16 11:09 Hyllegaard

Here it is :

permission-cache-naemon-3

mgadi avatar Sep 14 '16 12:09 mgadi

Sorry, it should have been g+w instead. Just tested on my own setup.

Hyllegaard avatar Sep 14 '16 12:09 Hyllegaard

Thank's it work's ! ;-)

mgadi avatar Sep 14 '16 13:09 mgadi

You might want to user o-w to remove the write rights for other users.

Hyllegaard avatar Sep 14 '16 13:09 Hyllegaard

Perfect ...

mgadi avatar Sep 14 '16 13:09 mgadi