Fix syntax error in ftp scripts and fix permissions.