#/bin/sh

echo -n "Trying to fix permissions for cron tasks... "

chmod 0755 /etc/cron.d >/dev/null 2>&1

# fix anacron executor
chmod 0644 /etc/cron.d/0hourly >/dev/null 2>&1

# fix noanacron executor
chmod 0644 /etc/cron.d/dailyjobs >/dev/null 2>&1

# fix anacron daemon launcher
chmod 0755 /etc/cron.hourly/0anacron >/dev/null 2>&1

chmod 0644 /etc/cron.d/plesk-backup-manager >/dev/null 2>&1
chmod 0644 /etc/cron.d/billing-task-manager >/dev/null 2>&1
chmod 0644 /etc/cron.d/drweb-update >/dev/null 2>&1
chmod 0644 /etc/cron.d/mailman >/dev/null 2>&1
chmod 0755 /etc/cron.daily/60sa-update >/dev/null 2>&1
chmod 0755 /etc/cron.daily/50plesk-daily >/dev/null 2>&1
chmod 0755 /etc/cron.daily/drweb-update >/dev/null 2>&1
chmod 0755 /etc/cron.weekly/50plesk-weekly >/dev/null 2>&1
chmod 0755 /etc/cron.hourly/ctoblogs >/dev/null 2>&1
chmod 0755 /etc/cron.hourly/plesk-php-cleanuper >/dev/null 2>&1
chmod 0755 /etc/cron.monthly/50plesk-monthly >/dev/null 2>&1

echo "done"

exit 0
