Topic "Web site visited during files upload"

Author Message
mlaco

Guest


Hi!

I use WinSCP for updating my php website. I get regulary php parse-errors in php-error log. The reason is that people visit website during the file being copied...

Is there any setting which would result in uploading file to a temporary filename and than rename it automatically?

If not, what are the options?

(I think about having 2 copies of website on the server. One for production and one for uploading. After each upload, I would run some script to update the production copy).

Thanks for WinSCP, great software!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
You can achieve this by using SFTP and forcing WinSCP to enable resumable transfer for every file. Read documentation.
_________________
Martin Prikryl
mlaco

Guest


prikryl wrote:
You can achieve this by using SFTP and forcing WinSCP to enable resumable transfer for every file. Read documentation.


Thx, for reply!

I tried this. During the upload the target file is deleted, the upload-in-progress file has tmp name "filename.filepart".

Problem is, that the original file is deleted: so the website during upload is broken - because the file is missing.

Is there a way to setup WinSCP not to delete the original file, till the upload is complete?


My environment:

SSH protocol version = SSH-2
SSH implementation = OpenSSH_4.3
Encryption algorithm = aes
Compression = No
File transfer protocol = SFTP (v3)
------------------------------------------------------------
Can change permissions = Yes
Can change owner/group = No
Can execute arbitrary command = No
Can create symlink/hardlink = Yes/No
Can lookup user groups = No
Can duplicate remote files = No
Can check available space = No
Native text (ASCII) mode transfers = No
------------------------------------------------------------
Additional protocol information
The server does not support any SFTP extension.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
mlaco wrote:
Is there a way to setup WinSCP not to delete the original file, till the upload is complete?

No. But I can implement that.
_________________
Martin Prikryl
mlaco

Guest


prikryl wrote:
No. But I can implement that.


Wow, that would be great!!! Smile
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
This feature has been implemented already. It will be included into the next major release.
_________________
Martin Prikryl
mlaco

Guest


prikryl wrote:
This feature has been implemented already. It will be included into the next major release.


Thx!!!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License