0

I have a problem with autofs on mac. I made some shares:

auto_home:

*   -fstype=nfs,rw  roskilde:/space/home/&

auto_remote:

public  -fstype=nfs,rw  roskilde:/space/public
mosek   -fstype=nfs,rw  roskilde:/space/mosek
vmware  -fstype=nfs,rw  roskilde:/space/vmware

auto_master:

+auto_master        # Use directory service
/net            -hosts      -nobrowse,hidefromfinder,nosuid
/home           auto_home   
/remote         auto_remote
/Network/Servers    -fstab
/-          -static

so the problem is this. The shares mount fine, I think, but the problem is that everything mount with permissions like this:

dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 andrea
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 eda
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 hap
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 joachim
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 ruben
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 sandvik
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 tomas
dr-xr-xr-x  2 root  wheel  1 Nov 20 14:30 ulfw

where the owner should be username:users

when I try logging into the server:

$ ssh tomas@lyngby
Password:
Could not chdir to home directory /home/tomas: Operation not permitted
-bash: /home/tomas/.bash_profile: Operation not permitted
lyngby:/ tomas$ cd /home/tomas/
-bash: cd: /home/tomas/: Operation not permitted

What causes this, and how do I fix it?

  • I've never worked with this on the Mac side, but presuming that it functions similarly to fstab, your mount instruction parameters have to specify ownership and permissions if you want that functionality. Otherwise, mount points will always be owned by root as the automount process is run through it. – douggro Nov 20 '14 at 15:26
  • in fstab how do you specify the ownership and permissions of a mount? fstab and automount are very similar, so maybe I can use the info – Tomas Nov 25 '14 at 11:50
  • I would start reading here developer.apple.com/library/mac/documentation/Darwin/Reference/… in conjunction with Google searching to construct your mounts with correct permissions. Also you might have to check the system you're mounting the directories from to see if it will allow NFS exports. – douggro Nov 25 '14 at 15:47
0

I found out that the problem was very simple to fix. Just add the resvport option to all the mounting point, and if works like a charm

You must log in to answer this question.

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