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