You are not logged in.

#1 2017-05-31 13:44:32

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

[SOLVED] Permission issues with /var/cache: Contradicting information.

Hi,

[root@httpd /]# ls -lha /var/
total 16K
drwxr-xr-x 1 root root  132 May 25 08:51 .
drwxr-xr-x 1 root root  146 May 25 17:20 ..
drwxr-xr-x 1 root root   66 May 25 09:08 cache

[root@httpd /]# ls -lha /var/cache/naemon/
total 0
drw-rw-r-- 1 naemon naemon 32 May 25 10:41 .
drwxr-xr-x 1 root   root   66 May 25 09:08 ..
drw-rw-r-- 1 naemon naemon  0 May 25 08:55 checkresults
srw-rw---- 1 naemon naemon  0 May 25 10:41 live

[root@httpd /]# sudo -u naemon touch /var/cache/naemon/test
touch: cannot touch '/var/cache/naemon/test': Permission denied

That should sum up why I am confused. Naemon is a fork of Nagios (see its arch wiki page).

It needs access to that folder for obvious reasons, but even though it's owned by the group and user, and has the correct write permissions, it cannot write to it.

Last edited by TremorAcePV (2017-05-31 17:54:13)

Offline

#2 2017-05-31 13:48:20

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Permission issues with /var/cache: Contradicting information.

first off, dirs should almost always have execute permissions.

Offline

#3 2017-05-31 14:07:48

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] Permission issues with /var/cache: Contradicting information.

And secondly, make sure the immutable bit isnt set, as this might prevent you from writing/changing things, even as root AFAIK. See lsattr and chattr for that. The permissions thing seems much more likely though. Try sudo chmod +x /var/cache/naemon and see what happens.


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#4 2017-05-31 17:54:01

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

Re: [SOLVED] Permission issues with /var/cache: Contradicting information.

Scimmia wrote:

first off, dirs should almost always have execute permissions.

That was the issue. Thanks. I did not realize that about directories.

JohnBobSmith wrote:

And secondly, make sure the immutable bit isnt set, as this might prevent you from writing/changing things, even as root AFAIK. See lsattr and chattr for that. The permissions thing seems much more likely though. Try sudo chmod +x /var/cache/naemon and see what happens.

I've never heard of the "immutable bit". Time to read some web pages.

Offline

Board footer

Powered by FluxBB