Samba + 以句点结尾的文件/目录

Samba + 以句点结尾的文件/目录

我有一个 samba 共享,每当文件或目录名称以空格或句点结尾时,它都会在 Windows 中显示一个奇怪的文件名

如果我做

mkdir temp.

在 Windows 中看起来像 TB5AMV~R。

有办法解决这个问题吗?

更新:我的配置:

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

        smb ports = 445
        workgroup = WORKGROUP
        server string =

        # There was a recent security issue in Samba (Feb 5 2010), a claimed
        # zero-day exploit that exploited an insecure default configuration.
        # According to an Ubuntu Forums post on the topic, the "wide links" option
        # now defaults to no.

        follow symlinks = yes
        wide links = yes
        unix extensions = no

        # added by roy for win7 - 2009-09-09
        client ntlmv2 auth = yes

        # added by roy for recycle bin
        vfs object = recycle
        recycle:repository = .RecycleBin
        recycle:keeptree = yes
        recycle:exclude = *.tmp, *~, *.bak

        printcap name = /etc/printcap
        load printers = no

        cups options = raw

        log file = /var/log/samba/%m.log
        max log size = 50

        security = user

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        dns proxy = no


#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = yes
   writable = yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = no
   writable = no
   printable = yes

答案1

Samba 不认为temp.这是一个有效的 DOS 文件名,因此它会按照名称混乱规则默认为开启。您可以通过设置关闭名称修改

mangled names = no

在你的smb配置文件文件,然后重新启动 samba。名称修改可以指定为全局或服务特定参数。

相关内容