Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an OSX box containing a script which writes a unique file to a Samba share. The first part of the script mounts the share.

On the machine are 2 users- UserA and UserB. Each requires to run this script at any given time however only the user who mounted the share is able to write to it. I really need both users to have rwx access.

Here is what I have tried:

  • Mounting then chmod'ing the mountpoint (no effect- overruled by Samba server?)

  • chmod'ing the mountpoint then mounting (same as above)

  • sudo mount_smbfs

Both users have admin privileges. Ideally a solution would be executable by one of the users (contained in the script) and not rely on mounting at machine boot time.

Any ideas appreciated, thanks!

share|improve this question
up vote 1 down vote accepted

You may use the flags -f mode and -d mode for this. Note that you cannot grant more rights than the server allows.

But mount_smbfs should by default at least grant the rights set on the mount path, so it seems your share is locked down a bit too much on the server side.

share|improve this answer

I barely remember there must be guest account configuration in samba server. If you change guest user name as nobody and guest user group as nogroup your problem might be solved.

share|improve this answer

This sounds like a limitation in the Mac OS X SMB client. It's setting up the connection to the server as one of the users, then keeps that connection open and uses it for the second two.

Have you tried running the script on two separate machines, and seeing if that works?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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