When centreon is installed, the syntax in the init script is wrong, which causes ods to start as root instead of the nagios user. This causes the performance data files to be recreated as the root user and the nagios user can no longer write to the files.
Steps to Reproduce:
1. Install centreon
2. /etc/init.d/ods start
3. ps axu |grep ods
ods is running as root user
ods should be running as nagios user
Here is a change to the init script that makes ods run as the nagios user.
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/files/ods.initd,v 1.1 2008/03/28 18:38:07 hollow Exp $
ebegin "Starting OreonDataStorage (ODS)"
start-stop-daemon --start --pidfile /var/run/ods/ods.pid \
--chuid nagios \
--exec /usr/sbin/ods \
ebegin "Stopping OreonDataStorage (ODS)"
start-stop-daemon --stop --pidfile /var/run/ods/ods.pid \
from the s-s-d help text:
-c, --chuid <arg> deprecated, use --user
(In reply to comment #2)
> from the s-s-d help text:
> -c, --chuid <arg> deprecated, use --user
Perhaps there is some other issue with the ods init script then, because it definitely starts ods as the root user. It caused me many headaches before I realised what was going on.
start-stop-daemon --help shows this:
change to this user/group before starting process
-u|--user <username>|<uid> stop processes owned by this user
To me, this tells me that --user is used to "stop processes owned by this user", not to start the process as this user!
Closing as CANTFIX, the package is not any more in the main tree.