大网数据广告活动
服务器运维问答

Samba share yielding "invalid handle"

· 52CE 我爱测

I have a strange behavior that came up suddenly with a samba share ( arch linux ) since yesterday. The only trigger that I can think of is a system update ( pacman -Syu ). Ever since, the root share ( / ) is accessible and all di…

问题原文

原帖链接 · aag · CC BY-SA 3.0

I have a strange behavior that came up suddenly with a samba share (arch linux) since yesterday. The only trigger that I can think of is a system update (pacman -Syu). Ever since, the root share (/) is accessible and all directories are visible but any attempt to access any of the directories triggers an "invalid handle" response in Windows. If I however share any of the directories (e.g. /data) as a separate share, it is fully accessible without trouble. Here is the share definition.

In the meantime, I have isolated the issue to the Samba server (rather than the Windows host). A second Arch Linux installation will mount the [data] share correctly, but will refuse access to the root [/data/root_ssd] share. Conversely, starting Samba on this new, virgin Arch Linux install will again lead to no sharing of the root path.

Any ideas? It seems to me that this behavior is new to a recent Samba upgrade.

    [antergos1-festplatte]
    comment = 20 GB Festplatte
    path = /
    writeable = yes
    create mask = 0766
    directory mask = 0777
    guest ok = yes
    force user = aag
    browseable = yes

    [data]
    comment = webserver directories
    path = /data
    writeable = yes
    create mask = 0777
    directory mask = 0777
    guest ok = yes
    force user = aag
    browseable = yes
    force group = admins

已采纳解答

原帖链接 · Peter Rindfuss · CC BY-SA 3.0

This behavior comes with the latest Samba security updates. I just encountered it with Debian Wheezy. It seems that fixing CVE-2015-5252 either intentionally or inadvertently blocks root level shares (/).

As a workaround, you can set in smb.conf
[global]
unix extensions = no
[share]
wide links = yes

Note: unix extension = yes, which is the default, would disable wide links.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-12-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。