Understanding the “/usr/bin/crontab Permissions Are Wrong” Error

When managing scheduled tasks in cPanel, you may come across the error message:

/usr/bin/crontab permissions are wrong. Please set to 4755

This issue occurs due to incorrect file permissions on the /usr/bin/crontab binary, preventing users from executing cron jobs properly. It is common on RedHat, CentOS, and Fedora servers.

How to Fix “/usr/bin/crontab Permissions Are Wrong” in cPanel

To resolve this issue, you must correct the file permissions and ensure the necessary cron packages are installed. Follow these steps:

1. Log Into the Server

Access your server using SSH or the console as the root user. You can use an SSH client like PuTTY or run the following command from your terminal:

ssh root@yourserver.com

2. Install the Required Packages

Make sure vixie-cron and crontabs are installed. If they are missing, install them using the following command:

yum -y install vixie-cron crontabs

3. Set the Correct Permissions

After installation, change the permissions of /usr/bin/crontab to 4755 by executing:

chmod 4755 /usr/bin/crontab

4. Verify the Changes

Once the command executes successfully, verify the new permissions using:

ls -l /usr/bin/crontab

You should see output similar to this:

-rwsr-xr-x 1 root root 32168 Mar  5 12:34 /usr/bin/crontab

Restart the Cron Service

For the changes to take effect, restart the cron service:

systemctl restart crond

Final Check: Run a Test Cron Job

To ensure everything is working, create a test cron job. Use:

crontab -e

Add a simple job, like:

* * * * * echo "Cron job is working" >> /root/cron-test.log

Save and exit, then check the log file after a few minutes:

cat /root/cron-test.log

If you see “Cron job is working,” the issue is resolved.

Need More Help?

If you still face issues with cron jobs on your UnderHost server, our support team is available 24/7. Reach out via @CustomerPanel for expert assistance.