>>334set permissions to 755 and make sure the owner of the all the directories and files is the user that the script is running as.