# explanation of samba "create mask/mode"?

## Belthezar

Could someone out there try and explain how the create mask and create mode lines in a samba config works?  I've been googling for about 20 minutes but coming up with nothing.

I (nearly) fully understand permissions under Linux in general, but I just can't figure out how to use create mask when making shares under samba.  :Confused: 

What I would like is to be able to create a samba share that points to my apache htdocs folder.  I only want to give myself access to this folder, however I need the permissions to always use the apache user/group and not my own username.  I also want the numeric permissions to always be 770.

I'm using the following right now for my samba share, but any file I touch under windows resets the user/group to my own which means I have to ssh into the linux box and do a chgown and chgmod before the web server will serve up the modified files

```

[htdocs]

    comment = HTDOCS root

    path = /path/to/htdocs

    browseable = yes

    read only = no

    create mode = 0770

    users = sandej

```

So is create mask or create mode what I need to learn to  do this?

----------

## acidreign

When you access a file, from windows on the linux box running samba.. when you upload/save it.. its permissions are set to the user that you mounted the drive as ?

----------

