I want to upload backup archives from one server to another server using ftp. In my backup cronjob I use this script to upload files:
MEDIAFILE=/var/somedir/somefile.encrypted if [ -r $MEDIAFILE ] # File seems to exist and is readable then ftp -n $FTPHOST <<END_SCRIPT quote USER $FTPUSER quote PASS $FTPPASS cd backups put $MEDIAFILE quit END_SCRIPT fi
This script returns:/var/somedir/somefile.encrypted: No such file or directory. But the file exists and the user executing the script has rights to read the file.
What is causing this error?