Samba share problem: filenames with colon

  • Is there a way to get samba to accept colon (:) in filenames. Now all files with colons in their names are shown in (client) listing but cannot be played. They are also shown zero length in the clients (kodi)listing. My server is RPi with Libreelec 7.9 and client Amlogic S905 with 8.90.4.

    It was said somewhere else that option 'mangled names = no' should cure this, but this seems to be already in the [global] of /etc/smb.conf.

  • The mangled names function in Samba was deprecated aeons ago so it's not the solution. You have two choices:

    a) Investigate the "catia" vfs module which can map the illegal : character into something legal

    b) Rename files so they don't use the illegal : character

  • The mangled names function in Samba was deprecated aeons ago so it's not the solution. You have two choices:

    a) Investigate the "catia" vfs module which can map the illegal : character into something legal

    b) Rename files so they don't use the illegal : character

    c) Use NFS instead of samba which does not have this limitation

  • I have thought that NFS-server is not (and can not easily be) enabled in Libreelec?

    I solved the problem by mounting the remote filesystem with sshfs (Network Tools addon).

    Ahh, I thought that libreELEC is the client.

    It is a shame that libreELEC (linux based) is missing the tiny NFS server but provides the much bigger samba stuff.

  • As Samba has these limitations and NFS is not an option in Libreelec-only household, could the sshfs option be added to the wiki-section "Mounting network shares"? That is:

    - install Network tool addon in client,

    -ssh to to the client

    -"mkdir /storage/recordings" (or whatever) in client.

    -make keys in client with "ssh-keygen"

    -add the key in clients /storage/.ssh/id_rsa.pub to the servers (here 192.168.1.222)

    /storage/.ssh/authorized_keys

    -test the passwd:less connection with "ssh [email protected]" (in client)

    -in client make (or add to) /storage/.config/autostart.sh with

    Bash
    #!/bin/sh
    (sleep 5; \
      sshfs [email protected]:/recordings /storage/recordings; \
    )&
  • Login to the Pi (server) and learn how to use the 'sed' command to bulk rename files. Job done.

    Yes, I might be able to do that. But the files with colons keep coming from various of sources. So it would have to be automated somehow. And I'm not sure if every Libreelec user is ready, able and willing to do that. That's why I suggested an alternative solution (mount with sshfs). You don't think it is a good idea to add that to wiki?

  • I don't think I ever saw colons in a filename actually and I've been a geek all my life :)

    I jus counted:

    Code
    >ls | wc -l
    179
    >ls | grep : | wc -l
    156

    So 87% of my (video)files has colon in their name. These are mainly Tvheadend recordings and downloaded mp4:s from our national tv-company.

  • You can avoid colons in filenames by selecting advanced or expert level in Tvheadend, then going to Configuration -> Recording and tick "Use Windows-compatible filenames" in the recording profile.

    so long,

    Hias