Typically I upload updated files/scripts over Secure FTP to my server to replace existing copies of those files as I make changes. But this has the nasty behavior of writing directly to those files. This means that while the files are being uploaded, those files/scripts will be broken (due to being incomplete) for anyone who loads the web site during that time. How can I fix this?
I assumed the secure FTP/SSH daemon would be smart enough to keep in-progress downloads in a temporary location (like /tmp) until the transfer is complete, and then quickly copy the files to the intended location. Is there an easy way to make it do something like that?