crond: (*system*) BAD FILE MODE Error and Solution

The “BAD FILE MODE” error in crond usually occurs when the file permissions on the crontab file or directory are incorrect. The error message indicates that the crontab file has a bad file mode, which means that it is either too permissive or not permissive enough for the crond daemon to access it.

To fix this error, you need to check and adjust the file permissions on the crontab file and directory. Here are the steps to do this:

  1. Check the permissions on the crontab file and directory. You can do this by running the following command:
    ls -ld /etc/cron*

    This will show the file permissions for the crontab files and directories. Make sure that the permissions on the crontab directory (/etc/cron. (www.patchhawaii.org) d, /etc/cron.daily, etc.) are set to drwxr-xr-x (755) and the permissions on the crontab files are set to -rw-r--r-- (644).

  2. If the permissions are not set correctly, you can adjust them using the chmod command. For example, to set the permissions on the crontab directory to 755, you can run the following command:
    chmod 755 /etc/cron*

    This will set the directory permissions to drwxr-xr-x (755), which allows the crond daemon to access the crontab files.

  3. After adjusting the file permissions, you may need to restart the crond daemon for the changes to take effect. You can do this by running the following command:
    service crond restart

    This will restart the crond daemon and reload the crontab files with the correct permissions.

By following these steps, you should be able to fix the “BAD FILE MODE” error in crond and ensure that your crontab files are accessible by the crond daemon.

Leave a Comment