I have just written some code to deploy a website via FTP. Worked on my test machine, but failed when used 'live' for the first time. The test and live FTP server is FileZilla. The error message was '500 Failed to delete the file'. Ok, but why? Checked FTP user permissions (had everything), and attempted to delete via Windows Explorer (same error message). Looked at Windows permissions on the server, but these seemed ok.
Then happened to spot that the file had the read-only flag set. Grr.
Updated: 2009-01-15: It seems that the Filezilla Server 0.9.29 beta (the version we are using, which is the most up-to-date version) doesn't support changing these permissions via FTP, so we're stuck. I guess we either have to live with manually clearing these flags or find another FTP server.