sftp bugs
John A Meinel
john at arbash-meinel.com
Fri Dec 2 04:42:56 GMT 2005
Robert Collins wrote:
> On Thu, 2005-12-01 at 12:11 -0800, Robey Pointer wrote:
>
>> 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.
>
> That makes sense to me. So the question is:
>
> is sftp://host//absolute/path
> or
> is sftp://host/absolute/path
>
> more useful?
>
> For HTTP, FTP, and File:// urls the latter syntax is used: the
> presumption is that all resources on the filesystem have the same
> location *regardless* of user credentials.
>
> I think that this is easier to debug and easier to understand than URL's
> where the resource location randomly changes if the credentials change.
Well, how does the supermirror handle it? I could have sworn that it
gave you a different path depending on you username. So if you connected
as sftp://arch%ive-foo/cat--b--v@sourcecontrol.net/ it would put you at
the root of your project.
Which means that even with absolute paths, you still have a floating
root directory depending on username.
So your argument doesn't mean a lot to me.
In my head, it depends more where people are thinking to put their
stuff. I control my main server, so I tend to put things in the shared
location, thus:
sftp://myhost/srv/bzr/branches/
Now, some people might generally host their archives in their personal
web space, so they would do:
sftp://myhost/home/jameinel/public_html/bzr/branches/
And shortening that to:
sftp://myhost/public_html/bzr/branches/
Could be nice.
Also there is the tie-breaker that the IETF draft spec uses
sftp://host/relative/path
and
sftp://host/%2Fabsolute/path
The other thing I'm guessing is that they really did mean:
sftp://host//absolute/path
Because the little blurb I read made it sound like '/' was a reserved
character in the username/password/host fields (which it is) not in the
path portion.
John
=:->
>
> Rob
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051201/c1b78092/attachment.pgp
More information about the bazaar
mailing list