cron job can't access /dev/ttyS0
I have a script to log data from the serial port (via dd if=/dev/ttyS0 of=data.log) and I would like to run as a cron job. Works fine when I am logged on, but if I am not logged on I get a permission denied error from the dd command. i.e. I don't have permission to access /dev/ttyS0 unless I am logged on to the system. Note that I do not have root access and the cron job is executed from my personal account.
I don't know much about cron and access to physical ports. I am wondering why the cron job runs and dd can access /dev/ttyS0 without a hitch when I am logged on, but doesn't work when I'm logged off?
Thanks!
|