Cron Permission Denied

Posted by worldthreat on Server Fault See other posts from Server Fault or by worldthreat
Published on 2010-01-20T19:43:57Z Indexed on 2010/03/12 13:08 UTC
Read the original article Hit count: 408

Filed under:
|
|
|

good day, I have a bash script in my home directory that works properly from the command line (file structure is default media temple DV. < noted for certain permission issues) but receive this error from cron: "/home/myFile.sh: line 2: /var/www/vhosts/domain.com/subdomains/techspatch/installation.sql: Permission denied" NOTICE: it's just line 2... it writes to the local server just fine.

Below is the Bash File:

    #!/bin/bash
mysqldump -uUSER -pPASSWORD -hHOST dbName> /var/www/vhosts/domain.com/subdomains/techspatch/installation.sql

mysql -uadmin -pPASSWORD -hlocalhost dbName< /var/www/vhosts/domain.com/subdomains/techspatch/installation.sql

can't chmod from bash (lol, yeah i tried). writing the file there and setting the permissions before the transfer is useless...

i have googled the heck out of this situation and this one still seems unique.... any insight is appreciated

© Server Fault or respective owner

Related posts about linux

Related posts about bash