You are not logged in.
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 deniedThat 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
first off, dirs should almost always have execute permissions.
Offline
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
first off, dirs should almost always have execute permissions.
That was the issue. Thanks. I did not realize that about directories.
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