IETF-SSH archive

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

Re: Case sensitivity on sftp servers



On Tue, Sep 09, 2003 at 11:27:46AM +1000, Martin Pool wrote:
> On  8 Sep 2003 Joseph Galbraith <galb-list%vandyke.com@localhost> wrote:
> 
> It's hard to imagine a filesystem where you can specify that when you
> create a file, though perhaps it could be supported when creating a
> directory.

The namespace where case sensitivity matters is the directory's, so at
first glance it makes no sense to specify case behaviour on file opens.

But I can see case-behaviour-in-file-open as a short cut for checking
the case behaviour of the containing directory (e.g., "preserve this new
file's name's case or fail if you can't" -> short for "does the
directory where this file is to be created preserve case?  If yes, then
create the file, if not fail"; "open the file that corresponds to name
'Xyz' with case-sensitive matching" -> "does 'Xyz's parent directory
preserve case, and if so, does it have a case-sensitive namespace?  If
yes open file 'Xyz', else fail").

Is such a short cut justified?  I think not.

> > I don't know about VMS?  And maybe others.
> 
> I think VMS is always case-insensitive.
> 
> OS X is an interesting case because it commonly uses both
> case-sensitive (UFS) and case-preserving (HFS) filesystems.  However
> in neither case does the application get to choose which semantics it
> wants.  All you can do is find out what a particular
> directory/filesystem will do.  (Linux is similar, although the
> case-insensitive filesystems are less often used.)

Bingo.  I think the client needs to be able to determine the case rules
of each directory and otherwise leave it at that (plus, maybe, the case-
behaviour-in-file-open conditional).

> > What I want is the ability to know whether or not Readme
> > and README are the same file.

Perhaps the protocol should offer a file and/or file handle equality
operation, particularly since there's no "inode" or otherwise "unique"
internal identifier attribute (nor can there always be).  And/or maybe
we could use a glob operation, so the client could glob("Readme").

> > And perhaps I don't really care about illegal characters and names.
> 
> Perhaps it's easier to have clients just try it and see?  That's
> simpler, more reliable and probably not too expensive.

Agreed.

Nico
-- 



Home | Main Index | Thread Index | Old Index