Permalink
Browse files

crontab fixer

  • Loading branch information...
serghey-rodin committed Sep 17, 2013
1 parent ef11c37 commit 8cdfe2b15c4d4551203c85649a704a5ee7184eff
Showing with 15 additions and 0 deletions.
  1. +15 −0 upd/fix_cron.sh
View
@@ -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

0 comments on commit 8cdfe2b

Please sign in to comment.