tags:

views:

33

answers:

1

Can anyone explain why this line works when called from shell, but fails when called via crontab?

passthru("tar xvf $file $tarfile/application $tarfile/application_detail $tarfile/application_device_type $tarfile/genre_application");
}

The error I got emailed after cron was

tar: itunes20100907/application: Cannot open: No such file or directory itunes20100907/application_detail

A: 

As the error says, you must be in the wrong directory. You should use the canonical path.


Note: When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not allowed to have .. components in the path to the executable.

Colin Hebert