I have a FreeNAS 11.0-U4 box running a CIFS share, which I normally access from my Linux system via an autofs mount. A few days ago, I noticed the mount misbehaving, displaying all files with useless DOS-style permissions (
rwxr-xr-x) instead of the actual underlying mode bits.
I decided to try it out by hand. I ran the
sudo mount.cifs -o username=theuser,uid=theuser,gid=theuser //theserver/theuser /mnt
Then I ran
mount with no arguments to see what the actual mount looked like. This came back:
//theserver/theuser on /mnt type cifs (rw,relatime,vers=3.0,cache=strict,username=theuser,domain=,uid=1000,forceuid,gid=1000,forcegid,addr=10.XX.XX.XX,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
Note in particular the presence of
nounix (which disables all UNIX extension support),
dir_mode, all of which combine to force 0755 permissions on everything.
I am not specifying these options, and I'm pretty sure they're not lurking in a config file somewhere, so I'm very confused as to why they're appearing. This setup used to work -- certainly well enough to archive files off to the NAS without it deciding that every file is executable.
On the Linux side,
mount.cifs and the various samba components are version 4.6.7. On the FreeNAS side, v11.0-U4 is running samba 4.6.8.
Where are these options coming from? Do I need to tweak something on the server side? How can I bludgeon things back into line?