5

I want to give another user permission to a mount point of a network resource. The directory mode is 700 and the owner is, of course, the logged in user who created the mount point.

I have programs running as different users which have to access the resource as well, but they are unable to. I would like to change the file mode of the mount point located in /Volumes/, but -probably for security reasons- this cannot be done by simply using the sudo chmod go+rx /Volumes/<mount point>/ command.

How can I give other users permissions to my mount point of a network resource?

EDIT: Mounting is done the Mac way: via Finder. It's an AFP share (located on a Mac Server). Mount output: afp_4dskZR4jbiYw4tTvjg2EIbez-2.2d000004 on /Volumes/Work in Progress (afpfs, nodev, nosuid, mounted by foto5). I prefer to keep it the Mac way. I don't want to edit fstab manually to create static mount points (for example).

5
  • 1
    Depending on how the network share is exported you may not be able to change permissions at all. Which protocol do you use to mount the network resource CIFS, AFP, NFS)? Could you post the output of mount?
    – jaume
    Commented Feb 27, 2013 at 10:59
  • It's done the Mac way: via Finder. It's an AFP share (located on a Mac Server). mount output: afp_4dskZR4jbiYw4tTvjg2EIbez-2.2d000004 on /Volumes/Work in Progress (afpfs, nodev, nosuid, mounted by foto5). I prefer to keep it the Mac way. I don't want to edit fstab manually to create static mount points (for example) Commented Feb 27, 2013 at 11:15
  • Thanks, if the user you use to log in (foto5) has enough privileges you can you try to add permissions in the 'Get Info' window (Command-I) of the mounted network volume. sudo chmod go+rx ... should be OK but will give all users read-only access, would that be enough?
    – jaume
    Commented Feb 27, 2013 at 12:13
  • As with most network mounts, the node should get the same mode as the directory on the server. The only way to use chmod to change the node mode is to override the original server permissions by defining options via the -o option when using mount (noowners when using an afp mount point. CIFS offers more options for this matter). But the directory mode on the server is 750, which doesn't mirror the clients node mode of 700. Something is happening there... By the way, like I said, sudo chmod doesn't work and cmd-I doesn't offer anything to manipulate the mode / permissions of the node. Commented Feb 27, 2013 at 12:38
  • 1
    If I'm not mistaken, isn't this by design? If a server provides access control, it makes sense that you as a user account cannot override those permissions to provision further access to other users. I have never been able to get this to work on Mac or Windows.
    – bispymusic
    Commented Mar 2, 2013 at 20:26

1 Answer 1

5

The syntax will vary upon the filesystem use, but if it's SMBFS or CIFS based, you will need to specify the mode of the mount point, e.g. -d=777. For example:

mount -o nosuid,-d=777 -t smbfs //domain;uid:passwd@server/share /Volumes/<mount point>

where:

  • domain = Domain or Workgroup
  • uid = Username
  • passwd = Password
  • server = Name or IP address of the server
  • esri = Name of the share
1
  • 1
    Good answer indeed, but unfortunately it doesn't answer my question in particular. It's an AFP share. You could only have known if you read the comments, so I added that piece of information to the question part. I'll upvote as soon as I have enough rep. Commented Oct 30, 2013 at 11:06

You must log in to answer this question.

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