I’m getting a strange permissions error in my journal from cron/anacron… this is the output of journalctl -b --no-pager --catalog | grep anacron:
jan. 12 19:46:00 mypc anacron: Anacron started on 2022-01-12
jan. 12 19:46:00 mypc anacron: Can't open timestamp file for job cron.daily: Permission denied
jan. 12 19:46:00 mypc anacron: Aborted
And this is my anacrontab (/etc/anacrontab):
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
# the maximal random delay added to the base delay of the jobs
# the jobs will be started during the following hours only
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
@daily 1 bashrc.daily rsync -aAX $HOME/.bashrc /run/media/myuser/samsung/home/myuser/.bashrc
@daily 1 bash_aliases.daily rsync -aAX $HOME/.bash_aliases /run/media/myuser/samsung/home/myuser/.bash_aliases
Needless to say that nothing is getting synced; at first I thought it might’ve been due to me setting up my box using Ansible, so I tried dnf reinstall to see if that would fix the permissions, but that didn’t help.
May be you want to check with ls -l /etc/cron.* and make sure file under each folder cron.daily, cron.weekly, and corn.monthly are executable (chmod 755). Especially for cron.daily since your error message:
Thank you for the reply, Syaifur.
I have checked the permissions of the files and they are all set to 755. However, I checked what files I do have under the various folders, and none of them seem to include the commands I have put in the anacrontab.
For example, the file /etc/cron.daily/rpm seems to be a shell-script.