Results 1 to 6 of 6

Thread: Colon in file name makes Samba fail

  1. #1
    Join Date
    Oct 2010
    Location
    Vantaa, Finland
    Beans
    10
    Distro
    Ubuntu Studio 10.10 Maverick Meerkat

    Colon in file name makes Samba fail

    - Ubuntu 10.10
    - 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.

    Is there a way to fix that in Samba ?

  2. #2
    Join Date
    Feb 2005
    Location
    Oregon
    Beans
    496
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Colon in file name makes Samba fail

    This https://bugzilla.samba.org/show_bug.cgi?id=6196 claims it was fixed in 3.3.3, and Maverick has 3.5.4. Maybe this would make a good bug/regression report, though I haven't tried to verify it myself. I wasn't aware colons were supported for non-Windows clients before now.

  3. #3
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,306

    Re: Colon in file name makes Samba fail

    Uhmmm... if you have a Linux only environment, why are you using Samba? Samba is for Windows. NFS is for UNIX.

  4. #4
    Join Date
    Oct 2010
    Location
    Vantaa, Finland
    Beans
    10
    Distro
    Ubuntu Studio 10.10 Maverick Meerkat

    Re: Colon in file name makes Samba fail

    Quote Originally Posted by HermanAB View Post
    Uhmmm... if you have a Linux only environment, why are you using Samba? Samba is for Windows. NFS is for UNIX.
    Ubuntu defaults to Samba when you share a folder. While Samba is easy for a temporary share NFS is ok for more permanent sharing. For a quick directory share NFS is cumbersome and too complicated for an average user:

    https://help.ubuntu.com/community/SettingUpNFSHowTo
    Last edited by ajaaskel; November 11th, 2010 at 10:19 AM.

  5. #5
    Join Date
    May 2007
    Beans
    27

    Re: Colon in file name makes Samba fail

    Just run this following script to take out all of the colons

    Code:
     
    #!/bin/bash
    find "$@" -name '*:*' -exec rename 's/://g' {} +
    Name save it with root priveledges in /bin/ and name it something like colonremover (lol)

    Code:
    sudo gedit /bin/colonremover
    Code:
    colonremover /path/to/folder/or/file

  6. #6
    Join Date
    Feb 2007
    Beans
    24,981
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Colon in file name makes Samba fail

    From the Ubuntu Forums Code of Conduct.
    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.
    Thread closed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •