Re: filenames with special chars and posix path caps enabled - regression?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Aug 2016 10:48:56 -0500, Steve French <smfrench@xxxxxxxxx>
wrote:

> When mounting with newer dialects (vers=2.1 or vers=3 to get SMB2.1 or
> SMB3 support for example), or when mounting with CIFS to servers like
> Windows, the protocol dialect does not support these reserved
> characters, so by default we mount with posixpath mapping enabled to
> support mapping (posixpaths) of reserved characters to the SFM
> reserved range (same as Windows Services for Mac and the Mac itself
> does).  The result is that you can create and read the filenames
> remotely and they look fine but on the Samba server itself the
> reserved character will look strange since it is remapped.

Steve, thanks so much for your time and effort. And, you're right: in
fact, if I mount a share and create a file on it with one of those
reserved characters in the name, I can see that the actual filename on
the linux server has some "funny" characters in it.

Now I also understand why ls works (shows filenames as reported by the
server) while "cat" won't (client remaps characters, and server can't
locate a file with the remapped name).

> You could turn off posixpaths on mount (noposixpaths) on your cifs
> mount to see if this fixes it [...]

Didn't work for me; however, looking at the kernel source I found that
there is a "nomapposix" option that seems to do the trick. If I use
this option, I can read and write filenames with reserved characters
without any mapping.

Reason why this escaped me in the first place is that "mapposix" is not
documented in the mount.cifs manpage..

> [...] but the key will be looking at the mount options that were
> passed in to the kernel so we can see if you are mounting with
> posixpath mapping (which would force posixpaths to be mapped even
> though the server would have supported them without mapping)

Googling around, I came across this post
https://lists.samba.org/archive/samba-technical/2014-September/102671.html
so now I'm a bit confused as to what the default behavior should be.. I
thought my client/kernel would negotiate unix extensions by default
with a samba server, therefore no mapping would occur by default, but
apparently MAC-style mapping is now the default on linux too?

Andrea.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux