5

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)
  • 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
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
  • 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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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