Subject: Re: Strange file names

From: Spencer Shepler <[email-masked]>
Date: Thu, 3 Jan 2002 20:11:47 -0600

On Mon, Peter ?strand wrote:
> 
> The spec says that file named "." or ".." have no special semantics in
> NFS4. Does this mean servers should accept requests for creating files
> with these names? I believe quite many servers will have trouble with that
> :-) The same goes for names with "/" and "\". Which error code should
> servers return on, for example, CREATE with such strange filename? 
> NFS4ERR_INVAL?

NFS4ERR_INVAL is the appropriate error.

> I would prefer banning the following names in NFS4:
> 
> . (U+002E)
> .. (U+002E, U+002E)
> Names with / (U+002F)
> Names with \ (U+005C)
> Names with NULL (U+0000)

Why?  Some operating environments may make use of them.  For example,
a unix client and server could use '\' in filenames.  While with a
Windows client and server this would not work it doesn't seem
appropriate to ban use of that character for all.

Based on current NFSv2/v3 practice, I don't it is necessary for NFSv4
to restrict name construction any further than it does today.  The
server allowed to return an error if a character is used that it does
not support.

-- 
Spencer

---

From: Peter Åstrand <[email-masked]>
Date: Fri, 4 Jan 2002 10:20:36 +0100 (CET)

> appropriate to ban use of that character for all.

After thinking about it, I agree. 

Have I understood things correctly, if I say:

* NFS4 does not restrict any file name characters or file names
* NFS4 servers can return NFS4ERR_INVAL to indicate it did not allow a 
certain character or file name. 
* It's ok for a server to allow creation of files named "." and "..". 
* It's ok for a server to reject arbitrary names, like "UglyServer", or 
all names not matching "*.*" (enforcing names with a dot). 

?

-- 
Peter Åstrand                Telephone: +46-13-21 46 00
Cendio Systems               E-mail: [email-masked]
Teknikringen 3
583 30 Linköping
Sweden