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
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.
See also bug #11647 at Samba's bugzilla. It will be fixed.
From there comes another workaround:
I was trying to copy a file (.exe) and the file showed up as a folder with attributes rs.
The suggestions in Peter Rindfuss answer made the file disappear.
I found the following page and solution:
https://www.ixsystems.com/community/threads/disabling-dos-attributes-to-improve-samba-browsing-performance.24906/
After adding
store dos attributes = no
to the share (not sure if it works on global, haven't tried yet) I was able to copy the file.