crontab fixer

This commit is contained in:
Serghey Rodin 2013-09-17 11:05:07 +03:00
commit 8cdfe2b15c

15
upd/fix_cron.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Check if there is no crontab
if [ ! -e "/var/spool/cron" ]; then
exit
fi
# Fix ownership and permissions
for crn_tab in $(ls /var/spool/cron/); do
chown $crn_tab:$crn_tab /var/spool/cron/$crn_tab
chmod 600 /var/spool/cron/$crn_tab
done
exit