Skip to content
Permalink
Browse files
crontab fixer
  • Loading branch information
serghey-rodin committed Sep 17, 2013
1 parent ef11c37 commit 8cdfe2b15c4d4551203c85649a704a5ee7184eff
Showing 1 changed file with 15 additions and 0 deletions.
@@ -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.