/var/cache/nagios2 permissions / ownership

Dhawal Doshy dhawal at netmagicsolutions.com
Fri Dec 22 09:29:03 CET 2006


Marc Powell wrote:
> 
>> -----Original Message-----
>> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
>> bounces at lists.sourceforge.net] On Behalf Of Dhawal Doshy
>> Sent: Thursday, December 21, 2006 10:38 AM
>> To: nagios-users at lists.sourceforge.net
>> Subject: [Nagios-users] /var/cache/nagios2 permissions / ownership
>>
>> Hello List,
>>
>> I have been using nagios on redhat and clones for about 4 years and
> this
>> is my first debian (sarge) install. I happily installed nagios2 from
>> sarge backports and expected things to work just fine. However the
>> web-ui cgis kept complaining of "error: unable to read object
>> configuration data.. " making me feel like a newbie all over again ;-)
>>
>> A 'nagios -v nagios.cfg' led to no errors, the logs seems perfect as
>> well with no errors at all.. which made me point things to the 'object
>> data storage' which is '/var/cache/nagios2'
>>
>> The default permission / ownership on this directory are:
>>
>> myhost:/etc/nagios2# stat /var/cache/nagios2/
>>    File: `/var/cache/nagios2/'
>>    Size: 4096            Blocks: 8          IO Block: 4096   directory
>> Device: 305h/773d       Inode: 160653      Links: 2
>> Access: (2750/drwxr-s---)  Uid: (  104/  nagios)   Gid: (
> 33/www-data)
>> Changing to a 0755 appears to have solved the problem, but now my
>> question is: What should be the permissions / ownership of this folder
>> considering apache2 (running as www-data) is the webserver? i'll
>> appreciate any debian users helping me out with this (debian not being
>> my distro of regular use)..
> 
> I don't think there is anything debian-specific about this, at least on
> the surface. It really looks to be a straightforward permissions issue.
> Are you sure that apache is running with GID www-data? Try the ps
> command below to verify. Last column is GID.
> 
> $ ps -eo "%p %y %x %c %U %G" | grep apache
> 25064 pts/0    00:00:00 apache          root     root
> 25067 pts/0    00:00:00 apache          www-data www-data
> 25068 pts/0    00:00:00 apache          www-data www-data
> 25069 pts/0    00:00:00 apache          www-data www-data
> 25070 pts/0    00:00:00 apache          www-data www-data
> 25071 pts/0    00:00:00 apache          www-data www-data

Umm you are right.. the webserver was running as a different user. Sorry 
for the noise.

- dhawal

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list