IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sftp rename not good.



On Wed, May 14, 2003 at 11:49:43AM +1000, Damien Miller wrote:
> Dan O'Reilly wrote:
> >>Put a different way: if the semantics are irrelevant, then why are we
> >>even having this discussion?
> 
> [...]
> 
> > For example: in UNIX, it may be illegal to rename a file if one of the
> > same name exists.  In VMS, it may or may not be illegal, depending on
> > if file versions are specified for the complete file specification supplied
> > to the rename function.
> 
> So if we followed you suggestion and had sftp's rename method simply use
> the OS-supplied function, we would have clients that behave differently
> depending on the server.
> 
> This would break, among other things, scripted/automated applications
> and would be a step back from where we are now (where we at least know
> the semantics of sftp's rename method).

Unless a) the server can tell the client what semantics to expect and b)
the client can use that information to work in all cases; the sticking
point is likely going to be about atomicity, but there's no guarantee
that any user-land SFTP server implementation can provide atomicity on
platforms that normally don't.

As others have pointed out, humans may well cope with these variations
in rename semantics, and as you point out it's the scripts that will
have trouble - but can they be made to cope?

Nico
-- 



Home | Main Index | Thread Index | Old Index