Permission denied when copying some files ( due to certain characters in the file name)

Hello Everyone.

I have a Vero 4K+ with an external USB connected to it, mounting it via fstab and shared via samba.

When I want to add files to the vero, I transfer them via samba share on the vero.

The problem is some files I try share fail to copy. This seems to be down to certain characters in it. For example, Japanese or Chinese characters, ?, Some quotation marks (e.g. this fails but this " copies fine)

If I connect the hard drive to my computer and copy them directly and connect it backup to the Vero, I can watch the videos just fine which makes me think it’s something samba related

my fstab to mount the drive

UUID="5DFC-C6EC" /media/EXT vfat user,uid=osmc,gid=osmc,umask=022,relatime 0 0

My smb.conf (comments # removed)

[global]

    config file = /etc/samba/smb-local.conf

    workgroup = WORKGROUP
    security=user
    follow symlinks = yes
    wide links = no
    unix extensions = no
    lock directory = /var/cache/samba
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    log level = 1
    map to guest = bad user
    mangled names = no
    unix charset = UTF8
    dos charset = ISO8859-1
    display charset = ISO8859-1

    read raw = Yes
    write raw = Yes
    strict locking = no
    min receivefile size = 16384
    use sendfile = true
    aio read size = 2048
    aio write size = 2048
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072

[osmc]
    browsable = yes
    read only = no
    valid users = osmc
    path = /home/osmc
    comment = OSMC Home Directory
    public = yes

[automount template]
    browseable = yes
    -valid = no
    valid users = osmc
    path = %P
    hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/

Is the drive formatted as FAT32?
We don’t recommend this for larger files.

Thanks sam. It is FAT32. But it is not a file size issue, these are typically between 10 and 100MB.

It’s to do with the certain characters in the file name, as renaming the file to remove these characters lets the file copy fine.

I believe FAT16/FAT32 only supports short filenames and UTF-16 filenames are stored in a hacky way that won’t work well on Linux.

Unfortuante, as the same drive and copying method was working fine with a WDTV. Thanks for the assistance

Have you tried changing this to UTF16?

Special characters can be an issue in SMB shares.

1 Like