Samba fails with files having colon in file name

Bug #676304 reported by Arto Jääskeläinen
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Medium
Unassigned
samba (openSUSE)
Confirmed
Medium

Bug Description

smbd -V
Version 3.5.4

ver
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick
Kernel: 2.6.35-22-generic
Bit width: 32 bits
Sound: Advanced Linux Sound Architecture Driver Version 1.0.23.

- Long file names including colon
- Samba with mangling disabled

I inserted "mangled names = no" to /etc/samba/smb.conf because I need to see long file names. That works ok except with those file names containing colon. I have a lot files containing colon in file name since those files are originally named according to date and time. That is very common with videos and photos. I have Linux-only environment i.e. colon is a legal character in a file name.

Regression ? Please see:

https://bugzilla.samba.org/show_bug.cgi?id=6196

Robert Roth (evfool)
affects: ubuntu → samba (Ubuntu)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Robert,

thanks for reporting this bug and helping to make Ubuntu better.

Taking a look at the patch which fixed the bug you cited
(https://bugzilla.samba.org/attachment.cgi?id=3999&action=view)
It looks like it is already applied.

However, it does look like the block above the patched block is
also playing with ':' and returning NT_STATUS_OBJECT_NAME_INVALID
in some cases.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Do you have problems with colons anywhere in the filename, or only as the
last character?

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

Anywhere. Testcase: Just make a file called "photo_2010-11-11_12:30" for example.

Revision history for this message
Chuck Short (zulcss) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Natty Narwhal. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/. Thanks again and we appreciate your help.

Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

A little problem, I made an alpha1 CD and started live environment but SMB sharing is not enabled by default and trying to auto load needed files failed, could not find those, I'll try another time later and do a real install on hard disk.

Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

Testing done on Ubuntu Studio 11.04 installed on hard disk, colon problem persisting.

Chuck Short (zulcss)
Changed in samba (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Chuck Short (zulcss) wrote :

This has been fixed in natty.

chuck

Changed in samba (Ubuntu):
status: Triaged → Fix Released
Changed in samba (openSUSE):
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
chocolateboy (chocolateboy) wrote :

Has the fix been verified? I'm still encountering this issue with a samba 3.5.8 PPA on Maverick (i.e. the same version as Natty), and the upstream issue was reopened the day after this bug was marked "Fix released".

Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

Just tested, the error still exists in Natty.

Test case:
That's very easy to create. Just insert "mangled names = no" into "===Share Definitions==" section of /etc/samba/smb.conf, create some directory and mark it shared, create some long file names containing a colon and some without colon. Restart smbd (sudo service smbd restart). You will see the error instantly when you connect to that share.

Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

Please notice error can be seen only when mangling is off i.e. all file names are shown unmodified.
That mode is absolutely needed. There is not much use for changing "my-video-from-vacation-2011-01-16-08:54:02" into "C7MXR~1" ( =default setting of Samba for long file names) when viewing that share and copying files.

Revision history for this message
Jarmo (jjarven) wrote :

The problem exists in Ubuntu 11.10 too

Revision history for this message
chocolateboy (chocolateboy) wrote :

This issue still exists in 12.04.

Changed in samba (openSUSE):
status: Fix Released → Confirmed
Revision history for this message
MockY (mocky) wrote :

Exists in Ubuntu 12.04.04 with Samba 3.6.3

Revision history for this message
Kevin Dalley (nereocystis) wrote :

The problem still exists in Ubuntu 15.04 with samba-2:4.1.13+dfsg-4ubuntu3

Revision history for this message
greg (xeon-greg) wrote :

Ubuntu Server 16.04 LTS x64
samba Version 4.3.9-Ubuntu

problem still exists. filenames with colon displayed like this 0AXN28~4.AVI

Revision history for this message
thump (thump) wrote :

Problem still exists:

Server:
Ubuntu 14.04.5 LTS
samba 2:4.3.9+dfsg-0ubuntu0.14.04.3

Client:
Ubuntu 16.04.1 LTS
samba 2:4.3.9+dfsg-0ubuntu0.16.04.2

Setting "mangle names = no" makes files with colon unreadable on samba clients.

E.g. Share mounted over cifs via fstab. Try to open file in Dolphin client returns "Unable to run the command specified. The file or folder Filename: Example.mp4 does not exist."

All files within same directory that do not contain colons work fine. Same permissions and filetypes.

Revision history for this message
Evren Yurtesen (eyurtese-g) wrote :

The problem still exists in 16.04 Xenial with SAMBA 4.3.11
However I have partially solved the issue by converting the characters to another
https://evren-yurtesen.blogspot.fi/2017/04/how-to-access-files-with-colon-in.html

Revision history for this message
Ivan Kozik (ludios) wrote :

On xenial, I noticed that the Linux cifs client converts : to U+F022 (SFM_COLON) by default even when talking to a Samba with unix extensions. I think this happens in convert_to_sfm_char in linux's fs/cifs/cifs_unicode.c.

You can use the undocumented mount option "nomapposix" to turn off those character conversions, and then access to files with a colon works fine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.