7

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 //192.168.1.135/fooshare -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
//192.168.1.135/fooshare on /home/baruser/foodshare type cifs (rw,relatime,vers=default,cache=strict,username=foouser,domain=,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.135,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
4
  • This may seem stupid but have you tried -o unix? Seems sensible to me given the trend in options. Commented Dec 1, 2017 at 22:35
  • 1
    Yes I did, unfortunately 'unix' not an option: 'mount error(22): Invalid argument' Commented Dec 1, 2017 at 22:38
  • How unfortunate. Commented Dec 1, 2017 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
    Commented Apr 30, 2019 at 17:56

3 Answers 3

5

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 //192.168.1.135/fooshare ~/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
1
  • 3
    Adding vers=1.0 worked for me too. Turns out Samba's UNIX extensions are only compatible with SMB 1.0.
    – Malvineous
    Commented Oct 20, 2018 at 7:17
3

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.

0

The Linux CIFS client doesn't support creation of Windows-style symbolic links over the SMB 2 or 3 protocol. Currently, the Linux client supports another style of symbolic links called Minshall+French symlinks for both create and follow operations. Customers who need symbolic links can use the "mfsymlinks" mount option. We recommend "mfsymlinks" because it's also the format that Macs use.

To use symlinks, add the following to the end of your CIFS mount command:

,mfsymlinks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .