Page 1 of 1

FTP file upload, upload first then overwrite target file.

Posted: 2022-07-15, 11:25 UTC
by HanTimm
Would be handy to have an option where a file is uploaded first with a temp name and then renamed to the right name, if necessary overwriting an existing file. This way script files, like php, will not be executed half way through an upload on a busy server.

Re: FTP file upload, upload first then overwrite target file.

Posted: 2022-07-17, 13:47 UTC
by ghisler(Author)
It causes the same problem as when doing this locally: Special permissions of the target file will be lost. For example, I set the permissions of certain files to 666 so everyone can write to them. This would be lost. Not all FTP servers allow to set these permissions remotely (I had to set them via an ssh connection), so I can't just copy the permissions to the new temporary file.