-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathstep16_cronperm.sh
More file actions
executable file
·20 lines (20 loc) · 867 Bytes
/
step16_cronperm.sh
File metadata and controls
executable file
·20 lines (20 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
ls -lad /etc/cron* /var/spool/cron*
chown root:root /etc/crontab
chmod 0400 /etc/crontab
chown -R root:root /var/spool/cron
chmod -R go-rwx /var/spool/cron
cd /etc
ls | grep cron | grep -v preCIS | xargs chown -R root:root
ls | grep cron | grep -v preCIS | xargs chmod -R go-rwx
cd $cishome
# What about permissions for the following:
# drwxr-xr-x 2 root root 4096 Aug 2 2006 /etc/cron.d
# drwxr-xr-x 2 root root 4096 Aug 2 2006 /etc/cron.daily
# -rw-r--r-- 1 root root 0 Aug 2 2006 /etc/cron.deny
# drwxr-xr-x 2 root root 4096 Aug 2 2006 /etc/cron.hourly
# drwxr-xr-x 2 root root 4096 Aug 2 2006 /etc/cron.monthly
# drwxr-xr-x 2 root root 4096 Aug 2 2006 /etc/cron.weekly
# -rw-r--r-- 1 root root 255 Dec 10 2005 /etc/crontab
echo "After..."
ls -lad /etc/cron* /var/spool/cron*