Why ":" is not allowed in file names?

Xyster ! xyster_ at hotmail.com
Wed Apr 30 23:38:45 GMT 2003


Colons have a special meaning in Windows. They are used as a delimiter 
between a file name and its different streams on NTFS. The filename "hello" 
refers to the default data stream while "hello:mydata" would refer to a 
different data stream.
To see this behavior you can open a Command Window on an NTFS partition and 
create an alternate stream by typing: "echo my message > hello:mydata".
This will create a file "hello" in the directory. Typing "more < hello" will 
yield nothing while "more < hello:mydata" will print out "my message".

As far as I know, Samba doesn't support streams so it kills any attempt to 
create them.

Yuval




>From: Chere Zhou <qzhou at isilon.com>
>Reply-To: qzhou at isilon.com
>To: samba-technical at lists.samba.org
>Subject: Why ":" is not allowed in file names?
>Date: Wed, 30 Apr 2003 16:11:02 -0700
>
>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?
>
>Thanks,
>Chere


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus



More information about the samba-technical mailing list