autoremove all files owned by user nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Martin Reniec
Posts: 5
Joined: Mon Feb 20, 2012 4:27 pm

autoremove all files owned by user nagios

Post by Martin Reniec »

autoremove all files owned by user nagios

Hi,
we have problem on nagiosxi, one per week all files owned by nagios auto remove.
We disable autobackup script and restore in /usr/local/nagiosxi/scripts.
but still removed all files :(

help please :(
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: autoremove all files owned by user nagios

Post by scottwilkerson »

I would check the crontab's on the machine it see what you have running at that particular time.

There isn't anything that I am aware of that auto removes all files owned by a particular user.

Is it everything, or just in a certain directory?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Martin Reniec
Posts: 5
Joined: Mon Feb 20, 2012 4:27 pm

Re: autoremove all files owned by user nagios

Post by Martin Reniec »

crontab nagios user:

* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php > /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
01 * * * * /usr/local/nagiosxi/cron/recurringdowntime.pl > /usr/local/nagiosxi/var/recurringdowntime.log 2>&1

crontab root user:

######################################
# Nagios XI Cron Jobs - Run as root
######################################
# Backup MySQL Databases (daily 7:00am w/ weekly and monthly rotations)
#0 7 * * * /root/scripts/automysqlbackup

# Backup Postgresql Databases (daily 8:00am w/ weekly and monthly rotations)
0 8 * * * /root/scripts/autopostgresqlbackup


directory leave but all files /home/nagios ..... remove :(
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: autoremove all files owned by user nagios

Post by scottwilkerson »

it removes file in /home/nagios ?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Martin Reniec
Posts: 5
Joined: Mon Feb 20, 2012 4:27 pm

Re: autoremove all files owned by user nagios

Post by Martin Reniec »

scottwilkerson wrote:it removes file in /home/nagios ?
yes
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: autoremove all files owned by user nagios

Post by mguthrie »

There isn't anything in that directory that Nagios actually uses. The nagios user is set to nologin so it doesn't really even need that directory.
Locked