Why ":" is not allowed in file names?

Christopher R. Hertel crh at ubiqx.mn.org
Wed Apr 30 23:33:39 GMT 2003


Richard Sharpe wrote:
> 
> On Wed, 30 Apr 2003, Chere Zhou wrote:
> 
> > in reply_ntcreate_and_X at nttrans.c:
> >
> >                         /*
> >                          * Check to see if this is a mac fork of some kind.
> >                          */
> >
> >                         if( strchr_m(fname, ':')) {
> >                                 END_PROFILE(SMBntcreateX);
> >                                 return
> > ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
> >                         }
> >
> > I would like to know why we do not allow ":" in file names?
> 
> Well, and interesting question for you is why do you want to allow colons
> in file names?

No, I don't think so.  Colons, dashes, and other punctuation are common.  I
can find all sorts of files on my Linux box with colons in the name.  I
think that the original question is the correct one.

The answer is that colons are reserved by IBM/Microsoft OSes.  See page 24
of the SNIA CIFS Technical Reference.

The colon is used to delimit device names (eg. "C:", "LPT1:") and also (I
believe) to delimit NTFS stream names.

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the samba-technical mailing list