Differences
This shows you the differences between the selected revisions of the page.
2009-02-12 | 2009-04-20 | ||
transfer_mode (martin) | loosing attributes with transfer to tenmporary name (martin) | ||
Line 7: | Line 7: | ||
WinSCP is able to store file being transferred to temporary filename first, renaming it to the target name only once the transfer successfully finishes. | WinSCP is able to store file being transferred to temporary filename first, renaming it to the target name only once the transfer successfully finishes. | ||
- | There are two reasons to do that: | + | Reasons to do that: |
* If the transfer is interrupted, on the next attempt (either manual or automatic), WinSCP is able to detect the partial/temporary file and suggest you transfer resuming automatically (or even resume automatically). | * If the transfer is interrupted, on the next attempt (either manual or automatic), WinSCP is able to detect the partial/temporary file and suggest you transfer resuming automatically (or even resume automatically). | ||
* While updating an existing file, the original version of the file exists during whole transfer. This is particularly useful when updating frequently accessed file on web sites. | * While updating an existing file, the original version of the file exists during whole transfer. This is particularly useful when updating frequently accessed file on web sites. | ||
+ | |||
+ | Reasons not to do that: | ||
+ | * As the file is uploaded to a temporary name, it is technically a new file, even though the file with target name already exists. So after the original file is deleted and temporary file is renamed to the original file name, you loose all attributes of the original file (such as owner and group) except for permissions. | ||
For performance reasons transfer to temporary file name is enabled by default for files larger than a given threshold. The threshold is initially 100 KiB. You can change the threshold. You can also enable the feature for all files, particularly when looking to achieve the second impact. You may also need to disable the feature altogether, particularly if you do not have permissions required (e.g. permissions to create a new file in target directory). | For performance reasons transfer to temporary file name is enabled by default for files larger than a given threshold. The threshold is initially 100 KiB. You can change the threshold. You can also enable the feature for all files, particularly when looking to achieve the second impact. You may also need to disable the feature altogether, particularly if you do not have permissions required (e.g. permissions to create a new file in target directory). |