Skip to content

Commit 8cdfe2b

Browse files
committed
crontab fixer
1 parent ef11c37 commit 8cdfe2b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

upd/fix_cron.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Check if there is no crontab
4+
if [ ! -e "/var/spool/cron" ]; then
5+
exit
6+
fi
7+
8+
# Fix ownership and permissions
9+
for crn_tab in $(ls /var/spool/cron/); do
10+
chown $crn_tab:$crn_tab /var/spool/cron/$crn_tab
11+
chmod 600 /var/spool/cron/$crn_tab
12+
done
13+
14+
exit
15+

0 commit comments

Comments
 (0)