sftp bugs
Robey Pointer
robey at lag.net
Thu Dec 1 20:11:10 GMT 2005
On 1 Dec 2005, at 2:01, Jan Hudec wrote:
> On Thu, Dec 01, 2005 at 10:25:23 +0100, Matthieu Moy wrote:
>> Jan Hudec <bulb at ucw.cz> writes:
>>
>>> On Wed, Nov 30, 2005 at 19:10:17 -0600, John A Meinel wrote:
>>>> What if we do this:
>>>> sftp://host//absolute/path
>>>> and
>>>> sftp://host/~/relative/path
>>>
>>> The second is a special case of the first ;-). Because ~ expands to
>>> /home/user -- *including* the leading slash...
>>
>> It's expanded by your shell if it's in the first position of a token.
>> Here, it wouldn't be expanded by the shell, and has to be interpreted
>> somewhere in the sftp implementation.
>
> Yes, it has to. But it should be done this way...
Not necessarily. I tried to explain this in an email yesterday but
probably just confused the issue. :)
Basically, all SFTP says is that the path can be absolute or
relative. It doesn't say relative to what. OpenSSH chooses to make
it relative to your home folder, because that's convenient, and it
knows you have a home folder. A dedicated standalone SFTP server may
not be using unix shell accounts for authentication, so you may not
even have a home folder. It might make paths relative to your
project folder, or an arbitrary folder that it thinks is convenient.
It may be hard to imagine right now, since almost all SFTP servers
are OpenSSH based, but I know of at least two all-python standalone
SFTP servers, so in the future we're probably going to see more SFTP
URLs where your authentication is not backed by a unix shell account
or home folder.
robey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051201/4eaf3430/attachment.pgp
More information about the bazaar
mailing list