Originally Posted by
currentshaft
I don't think so. You should check your work before committing to something so confidently incorrect. Being a self-proclaimed Unix expert of many decades, I expect more out of you.
A chmod of 711 means the owner can do anything, while group and other can execute. Here, I will demonstrate:
mkdir foo
chmod 0711 foo
sudo chown root:root foo
stat foo | grep Access
Access: (0711/drwx--x--x) Uid: ( 0/ root) Gid: ( 0/ root)
And guess what? You can cd into the directory.
What you can't do is list it, because that would require the read permission.
You are technically correct. Thanks for pointing that out. Sometimes we simplify answers for the audience. I must admit, I was assuming a GUI user using a browser to point-n-click into a directory. Yes, the OP said he was using cd - I saw that, but my brain ignored it completely. However, if you don't test using CIFS only, network-only access, not being local to the file system, then root doesn't matter, unless the network share team allows it. God I hope they don't.
What's the use in a chdir if you can't see anything inside the directory?
Now, Morbius1 probably knows more about CIFS (MSFT version) than anyone else here. I use autofs, constantly. autofs supports all the options that a normal 'mount' would support. file_mode=0664,dir_mode=0775 are definitely supported. In home setups, the mapping of Windows to Unix usernames/groupnames is controlled by the uid=,gid= and credentials= options. The uid/gid options support either Unix uid/gid or usernames/groupnames, which is convenient.
In one of my autofs config files, I have this:
Code:
winult -fstype=cifs,iocharset=utf8,rw,vers=2.1,uid=tf,gid=tf,file_mode=0664,dir_mode=0775,credentials=/etc/samba/winlap-D.credentials ://172.22.22.8/Data
That mounts the "Data" share from a Windows computer into "/D/winult". But my home Windows system doesn't use or have AD. The "/D/winult" is determined from 2 different autofs files. The "winult" is from the beginning of the line above. The "/D/" part is in the auto.master that refers to the auto.Data file containing the line above. This method is one of the confusing things in Unix that isn't expected, but has been that way for 20+ yrs.
Anyway, hope a concrete example helps. There are others in these forums.
BTW, I used to use the DNS name for the CIFS server, but MSFT broke that at some point and I got tired of fighting it, hence the IP address is used. Also, vers 2.1 is the highest level supported by my box. We all know what that means, but if the OP's share is from 2012, he will likely need to use a specific version as well. Let me look up the nmap command to probe for the exact CIFS version supported.
Code:
$ sudo nmap --script smb-protocols 172.22.22.8
Very handy. You'll see after running it.