IETF-SSH archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sftp rename not good.
* Joseph Galbraith <galb-list%vandyke.com@localhost> [030513 12:28] wrote:
> Let me make sure I understand the problem:
>
> - SSH_FXP_RENAME specifies that it is an
> error if the new file exists.
>
> - rename(2) specifies that if the new file
> exists, it is always overwritten.
>
> Therefore rename(2) can't be used to implement
> SSH_FXP_RENAME.
>
> Is this a correct summary of the problem?
That's the cause of the problem.
The actual problem is that it doesn't seem possible to do atomic
updates of files using sftp because of the way SSH_FXP_RENAME must
be implemented.
Also, I _think_ that using link(2) (without fsync) instead of
rename(2) allows for the system to lose the file completely
during an outtage.
I think there should be some way of invoking an actual rename(2)
on the server.
thank you,
-Alfred
Home |
Main Index |
Thread Index |
Old Index