I'm trying to mount a cifs share and have unix extensions enabled, but by default mount is passing 'nounix' and I can't figure out how to change the default behavior. I've checked 'man mount.cifs' and there is no option to do the inverse of 'nounix'.

Here is my mount command:

$ sudo mount -t cifs // -o username=foouser,password=foopass,uid=baruser,gid=baruser ~/fooshare

Then when I check all the options that actually got used in the mount operation, 'nounix' is present:

$ mount | grep fooshare
// on /home/baruser/foodshare type cifs (rw,relatime,vers=default,cache=strict,username=foouser,domain=,uid=1000,forceuid,gid=1000,forcegid,addr=,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
  • This may seem stupid but have you tried -o unix? Seems sensible to me given the trend in options. – Andrew Shum Dec 1 '17 at 22:35
  • 1
    Yes I did, unfortunately 'unix' not an option: 'mount error(22): Invalid argument' – Joel Cunningham Dec 1 '17 at 22:38
  • How unfortunate. – Andrew Shum Dec 1 '17 at 22:44
  • Were you able to get it working with acl configuration on shared directory on server side? Either vers=1.0 doesn't support acl or I'm not doing it right. – jonos Apr 30 '19 at 17:56

when i added ,vers=1.0 to the mount options, i changed the mount options from nounix to unix. you can check this with mount -l (unix is not an option which can be set implicit).

$ sudo mount -t cifs // ~/fooshare -o username=foouser,password=foopass,uid=baruser,gid=baruser,vers=1.0

to provide extra info:

$ sudo bash -c "echo 3 > /proc/fs/cifs/cifsFYI"

make sure you unmount the specified mount properly before setting the option. To view the status (number of current cifs mounts by):

$ cat /proc/fs/cifs/DebugData
  • 2
    Adding vers=1.0 worked for me too. Turns out Samba's UNIX extensions are only compatible with SMB 1.0. – Malvineous Oct 20 '18 at 7:17

Unfortunately it seems like the accepted solution no longer works. On Windows 10, under Turn Windows features on or off I enabled SMB 1.0/CIFS Server. I also had to discover the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters and set the value for SMB1 to 1.

That combination finally allowed my Linux guest to connect to and authenticate using vers=1.0 mount flag. Unfortunately, the nounix flag is still automatically assigned. I suspect that while Windows 10 has the ability to host Samba 1.0 mounts if forced into it via various tweaks, its support for the UNIX extensions was stripped at some point.

What a waste, the UNIX extensions are the only way to have native symlink support. The "modern" workaround of using the mfsymlinks mount option is garbage because while the Linux client can create and resolve symlinks, all the Windows user sees is a 4096-byte fake symlink file.

It's 2019, and we can't have symlinks on a network mount hosted by Windows and accessed by Linux clients. What a sad state of affairs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.