Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137261 - nagios-core-2.4 needs to add apache user to the nagios group
Summary: nagios-core-2.4 needs to add apache user to the nagios group
Status: RESOLVED DUPLICATE of bug 134344
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-19 07:41 UTC by Richard Scott
Modified: 2006-06-19 08:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scott 2006-06-19 07:41:49 UTC
When installing nagios 2.4 the apache user isn't added to the nagios group when using the '-noweb' flag.

This means that the config files located in /etc/nagios and the logs located in /var/nagios are unreadable by the cgi processes running via apache.

This means that you *always* get an error, even with a correctly configured setup.

We need to change the following:

        if use noweb; then
                enewuser nagios -1 /bin/bash /dev/null nagios
        else
                enewuser nagios -1 /bin/bash /dev/null nagios,apache
        fi

To be:

        enewuser nagios -1 /bin/bash /dev/null nagios

        if ! use noweb; then
                usermod -a -G nagios apache
        fi
Comment 1 Richard Scott 2006-06-19 08:01:28 UTC
or the other fix would be to change the ownership of /etc/nagios to be nagios:apache.

you could use the following for that:

enewuser nagios -1 /bin/bash /dev/null nagios

if ! use noweb; then
 chown -R nagios:apache ${D}/etc/nagios || die "Failed Chown of ${D}/etc/nagios"
fi
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-06-19 08:34:26 UTC

*** This bug has been marked as a duplicate of 134344 ***