Saturday, April 25, 2009

Psexec - run a process on a remote machine

A quick note to record a handy utility: psexec. It runs from the command line and allows you to run a command remotely. The command could be 'cmd' in which case you get a remote command line. Can also use it to run on multiple machines including an option to try all in a domain. Can specify credentials or it will try to impersonate your current login account. Very handy.

Wednesday, January 14, 2009

500 Failed to delete the file

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.