source: noc/setup.sh @ 991

Last change on this file since 991 was 49, checked in by presbrey, 17 years ago
scripts.mit.edu NOC permissions setup for nagios configuration
File size: 841 bytes
Line 
1#!/bin/sh
2
3chown -R nagios:nagios /home/noc/
4chmod 711 /home/noc/
5
6find /home/noc/ -type f | xargs -n1 chmod 644
7find /home/noc/ -type d | xargs -n1 chmod 755
8find /home/noc/ -name '*.cgi' -or -name '*.php' -or -name '*.pl' -or -name '*.sh' | xargs -n1 chmod a+x
9
10chown -R nagios:apache /home/noc/html/ /home/noc/ng/html/ /home/noc/ng/log/ /home/noc/ng/rrd/
11chmod -R g-w /home/noc/html/* /home/noc/ng/html/*
12chmod -R g+w /home/noc/ng/log/ /home/noc/ng/rrd/
13chmod g+w /home/noc/ng/log/ /home/noc/ng/rrd/
14
15if [ ! -h /etc/nagios ]; then
16        mv /etc/nagios /etc/nagios_OLD
17        ln -nfs /home/noc/nagios/ /etc/nagios
18fi
19
20chown -R root:root /home/noc/nagios/
21find /home/noc/nagios/ -type f | xargs -n1 chmod 644
22find /home/noc/nagios/ -type d | xargs -n1 chmod 755
23
24chown -R root:nagios /home/noc/nagios/private/
25chmod -R o-rwx /home/noc/nagios/private/
Note: See TracBrowser for help on using the repository browser.