Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 use Samba to access my fileserver. I have several shares, and I use local users to log in ("security = user").

Let's say the share "SpShare" is located at /SpShare. All files within the /SpShare directory are owned by Alice, and only Alice can read/write them. I want two things:

  • All users that have access to "SpShare" should be able to read all files in /SpShare.
  • All writes by users in "SpShare" should create files owned by Alice.

That is, even if I'm logged in as Betty, as long as Betty is a "valid user" of the SpShare share, I want all of Betty's file operations within that share to be carried out as if the user was logged in as Alice.

How can I accomplish this, without just setting "force create mode = 777" (I'd rather not do this)?

share|improve this question
up vote 2 down vote accepted

Use the force user directive instead in the definition of the share.

share|improve this answer

I don't recommend that as a course of action.

I recommend setting the files to 2770 access mode for directories and executables and 2660 for non-executables, and recursively setting the group ownership to a group that is common amongst all the users accessing that share.

The '2' in front of the more common mode setting forces newly created files to have their group set to the directory's group setting and not the default group for the user (usually their username).

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.