Ubuntu – How to mount cifs with unix extensions

cifsmountsamba

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)

Best Answer

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
Related Question