GNOME Bugzilla – Bug 562029
gvfs: Switch on POSIX extensions for samba
Last modified: 2018-09-21 16:31:34 UTC
The gvfs smb module appears to be unable to cope with certain filenames on the server side, and they appear as "scrambled" versions. e.g "Heroes 3x01 - (Volume Three: Villains) The Second Coming.avi" becomes "H0B9IZ~J.AVI" I could previously reproduce this with normal samba mounting ("mount -t cifs", etc), but then I turned on the "unix extensions" option, and the problem went away with normal samba, but not with gvfs. I'm not quite sure what the pattern is with the names that get scrambled (there are various other cases), but all the resulting names are of the form "<6 upper case letters>~<1 upper case letter>.<Extension in upper case>" like DOS trying to cope with Windows extended path names? Various long (bigger than DOS "8.3" form) are fine, but really long ones appear to get screwed up. Any ideas? This is with Debian Linux boxes at both ends, Samba 3.2.4 on the server and gvfs 1.0.2 on the client side.
Humph. Have figured out what the problem is. The POSIX extensions (which include full long filename support) aren't enabled by default in samba clients. I can in fact reproduce this in smbclient. smbclient has a "posix" command which enables said extensions and then the bug goes away, but it relies on some functions which are not currently exposed in libsmbclient... Hopefully this will get sorted out in Samba 4, and I'm going to file a bug upstream with Samba and try and get an "enable posix stuff" function exposed in a later version of libsmbclient, but for now this is unfixable.
Upstream bug that needs fixing first: https://bugzilla.samba.org/show_bug.cgi?id=5926
*** Bug 677397 has been marked as a duplicate of this bug. ***
*** Bug 725466 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/73.