Samba configuration

Dustin Decker dustind at moon-lite.com
Thu Mar 28 21:48:30 CST 2002


On Thu, 28 Mar 2002, Chris Midkiff wrote:

> I'm sure there is a way to change the rights on a file created by
> samba, but I'm not sure how to do it.  I've added a umask command to
> the .bashrc file that gives the correct rights when I touch from
> bash, but it does not give me the same thing when I create a file
> from Samba.  Reading through the samba docs, I've come accross some
> smb.conf parameters that might do the job (Force Create Mode,
> Inherit Permissions, etc.), but I can't come up with any good
> examples of how to use them.

Chris,
I haven't used Samba a lot lately, but I think the following _might_ get
you a step or two in the right direction:

[From http://us2.samba.org/samba/docs/man/smb.conf.5.html]

create mask (S)
A synonym for this parameter is create mode .

When a file is created, the necessary permissions are calculated
according to the mapping from DOS modes to UNIX permissions, and the
resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This
parameter may be thought of as a bit-wise MASK for the UNIX modes of a
file. Any bit not set here will be removed from the modes set on a file
when it is created.

The default value of this parameter removes the 'group' and 'other'
write and execute bits from the UNIX modes.

Following this Samba will bit-wise 'OR' the UNIX mode created from this
parameter with the value of the force create mode parameter which is set
to 000 by default.

This parameter does not affect directory modes. See the parameter
directory mode for details.

See also the force create mode parameter for forcing particular mode
bits to be set on created files. See also the directory mode parameter
for masking mode bits on created directories. See also the inherit
permissions parameter.

Note that this parameter does not apply to permissions set by Windows
NT/2000 ACL editors. If the administrator wishes to enforce a mask on
access control lists also, they need to set the security mask.

Default: create mask = 0744

Example: create mask = 0775

Dustin

-- 
Nobody really knows what happiness is, until they're married. And then
it's too late.




More information about the Kclug mailing list