I have quite a strange problem using cron. I distilled it thus far:I created following simple bash script in /home/user1/cron_dir/cron.sh:#!/bin/bashecho SuccessAs user1 I created following crontab:*/1 * * * * sh /home/user1/cron_dir/cron.shThis gets installed and runs as expected (getting a Success-message from cron in my local mail). However, if I log out from my user1 account, wait a couple of minutes to perform the cron job, log back in and check my local mail, I get:sh: 0: Can't open /home/user1/cron_dir/cron.shEdit: Thanks to garethTheRed I realized the problem: my home directory is encrypted. Of course the directory is only accessible when I'm logged in.
Cron can't access my home directory when I'm logged out
shell script;permissions;cron