Samba 和 utf8:我的 avi 标题变得奇怪

Samba 和 utf8:我的 avi 标题变得奇怪

我想从一台服务器共享我的电影文件夹。所以我用utf8

这是 smb.conf

[global]
workgroup = BLU
server string = nas
netbios name = NAS
server role = standalone server
hosts allow = 192.168.0.
log file = /var/log/samba/samba.%m
max log size = 50
realm = blu.priv
dns proxy = no 
kerberos method = secrets and keytab
server signing = mandatory
client signing = mandatory
smb encrypt = mandatory
restrict anonymous = 2
log level = 1
server min protocol = SMB3
client max protocol = SMB3
name resolve order = bcast lmhosts host wins
local master = No
preferred master = No
bind interfaces only = Yes
local master = No
preferred master = No
winbind use default domain = Yes
ldap admin dn = cn=ldapadm,dc=ldap1,dc=blu,dc=priv
security = ads
ldap ssl = start tls
tls verify peer = no_check
template homedir = /home/%U
template shell = /bin/bash
password hash userPassword schemes = CryptSHA512:rounds=7000
unix charset = UTF8

idmap config * : backend      = ldap
idmap config * : range        = 10000-20000
idmap config * : ldap_url     = ldap://ldap1.blu.priv
idmap config * : ldap_base_dn = ou=idmap,dc=ldap1,dc=blu,dc=priv
idmap config * : ldap_user_dn = cn=ldapadm,dc=ldap1,dc=blu,dc=priv

[Video]
   comment = Public Stuff
   path = /var/video
   public = yes
   writable = no
   printable = no
   guest ok = no
   follow symlinks = no

我用 mount.cifs 安装目录。

sudo mount.cifs -vvv //nas.blu.priv/Video -o iocharset=utf8,sec=krb5,user=pino,cruid=pino,vers=3.1.1,forceuid,forcegid,uid=$(id -u pino),gid=$(id -g pino),seal  /mnt/tmp/

我转到 /mnt/tmp ,我在本地看到这部电影在远程上变得非常奇怪的名称文件!为什么使用utf8来避免这些问题?

在本地

 md5sum Video/13º\ floor\:\ a\ nice\ movie.avi 
f7c74cd7da379ff3830043ce36e291f1  Video/13º\ floor\:\ a\ nice\ movie.avi 

在远程,标题变成..1L1HW1~H.AVI!

md5sum /mnt/tmp/1L1HW1~H.AVI 
1L1HW1~H.AVI f7c74cd7da379ff3830043ce36e291f1 

答案1

禁用损坏的名称使名称与本地目录中的名称相同,可以读取..但无法打开。

[Video]
   comment = Public Stuff
   path = /var/video
   public = yes
   writable = no
   printable = no
   guest ok = no
   follow symlinks = no

成为

[Video]
   comment = Public Stuff
   path = /var/video
   public = yes
   writable = no
   printable = no
   guest ok = no
   follow symlinks = no
   mangled names = no

相关内容