Colon (:) not allowed in filenames over CIFS ?

Status
Not open for further replies.

carl0s

Dabbler
Joined
Sep 16, 2012
Messages
32
I am using Ubuntu 12.04 on my laptop.
It seems that FreeNAS will not allow files with colons in the name, when accessed via CIFS.

Is this expected?

Gnome's inbuilt screenshot thing creates files like "Screenshot from 2012-08-11 14:36:41.png"
So it's quite common to have filenames with colons in them.
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
Colons are not allowed in windows file names because colons are special in Windows filenames (it's part of the stream specification, as in "c:"), so CIFS doesn't allow them either.

\/:*?"<>| are all disallowed. Any way you can change Gnome to use a different naming scheme?

Edit: Alternatively, why not use NFS shares in Linux instead of CIFS?
 

carl0s

Dabbler
Joined
Sep 16, 2012
Messages
32
Colons are not allowed in windows file names because colons are special in Windows filenames (it's part of the stream specification, as in "c:"), so CIFS doesn't allow them either.

\/:*?"<>| are all disallowed. Any way you can change Gnome to use a different naming scheme?

Yeah I'm aware of Windows' limitations, but I expected Samba (is it samba on FreeBSD?) to, erm, extend beyond that limitation.

I'm not sure about changing Gnome's behaviour. Gnome offers zero NFS integration either.. !
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
CIFS follows windows standards because it's a windows spec, regardless of the underlying filesystem. The ufs or zfs filesystem will happily take files with colons in them, and you could ftp or sftp such a file to your server, but if you try to create them through CIFS it won't let you. And if you do get such files into a CIFS share, any windows clients that try to access them will be unhappy (you'll end up seeing the mangled 8.3 name).

In the FreeNAS shell
Code:
[root@nas] /mnt/aux/public/crap# ls -l
total 2824
drwxrwxrwx   2 root   guest        5 Sep 16 15:42 ./
drwxrwxrwx  13 guest  guest       24 Sep 15 00:22 ../
-rw-rw-rw-   1 root   guest        0 Sep 16 15:41 foo.txt
-rw-r--r--   1 root   guest        0 Sep 16 15:42 foo:.txt
-rw-rw-rw-   1 root   wheel  2776656 Aug 22 00:47 sabnzbd-0.7.1_back.tar.gz


In windows
Code:
C:\>dir \\nas\public\crap
 Volume in drive \\nas\public is Public
 Volume Serial Number is DC78-C5A0

 Directory of \\nas\public\crap

09/16/2012  03:41 PM    <DIR>          .
09/15/2012  12:22 AM    <DIR>          ..
09/16/2012  03:41 PM                 0 foo.txt
08/22/2012  12:47 AM         2,776,656 sabnzbd-0.7.1_back.tar.gz
09/16/2012  03:42 PM                 0 FY921Y~B.TXT
               3 File(s)      2,776,656 bytes
               2 Dir(s)  483,975,022,592 bytes free


In my case, "foo:.txt" became "FY921Y~B.TXT".
 

carl0s

Dabbler
Joined
Sep 16, 2012
Messages
32
CIFS follows windows standards because it's a windows spec, regardless of the underlying filesystem. The ufs or zfs filesystem will happily take files with colons in them, and you could ftp or sftp such a file to your server, but if you try to create them through CIFS it won't let you. And if you do get such files into a CIFS share, any windows clients that try to access them will be unhappy (you'll end up seeing the mangled 8.3 name).

In the FreeNAS shell
Code:
[root@nas] /mnt/aux/public/crap# ls -l
total 2824
drwxrwxrwx   2 root   guest        5 Sep 16 15:42 ./
drwxrwxrwx  13 guest  guest       24 Sep 15 00:22 ../
-rw-rw-rw-   1 root   guest        0 Sep 16 15:41 foo.txt
-rw-r--r--   1 root   guest        0 Sep 16 15:42 foo:.txt
-rw-rw-rw-   1 root   wheel  2776656 Aug 22 00:47 sabnzbd-0.7.1_back.tar.gz


In windows
Code:
C:\>dir \\nas\public\crap
 Volume in drive \\nas\public is Public
 Volume Serial Number is DC78-C5A0

 Directory of \\nas\public\crap

09/16/2012  03:41 PM    <DIR>          .
09/15/2012  12:22 AM    <DIR>          ..
09/16/2012  03:41 PM                 0 foo.txt
08/22/2012  12:47 AM         2,776,656 sabnzbd-0.7.1_back.tar.gz
09/16/2012  03:42 PM                 0 FY921Y~B.TXT
               3 File(s)      2,776,656 bytes
               2 Dir(s)  483,975,022,592 bytes free


In my case, "foo:.txt" became "FY921Y~B.TXT".

That is as I would expect since you're using Windows as a client.

Anyway, I can confirm that the same behaviour happens when Ubuntu is acting as the SMB server to itself - i.e. I share my Pictures folder and access it locally, "Screenshot at 2012-02-29 23:33:18.png" becomes "S0HSMH~O.PNG" within the gnome file browser (nautilus).

So it's not specific to FreeNAS...

cheers :smile:
 
Status
Not open for further replies.
Top