[CentOS] Permissions question

Brett Serkez bserkez at gmail.com
Mon Oct 1 16:43:22 UTC 2007


On 10/1/07, Todd Cary <todd at aristesoftware.com> wrote:
> My www directory is owned by "apache" and the group is "todd" and the
> permissions are 775.
> My Windows computers use Samba and they log into Linux with "todd".
> Under the www directory there are various directories which may have a
> group belonging to a user e.g. "viewpoint".  Using this example, there
> is a directory under www (acutally called httpd), "viewpoint" that is
> owned by "apache" and is a member of the "viewpoint" group.  "todd" is
> also a member of  the "viewpoint" group.
> Now this is the problem I do not know how to correct:  if "todd" using
> Samba creates a directory in "viewpoint", the owner and group is "todd"
> with 755 permissions.  Now if the "viewpoint" user tries to write to the
> directory, he does not have adequate permissions.
> Maybe I have not setup the owners and groups correctly.  maybe there is
> something I need to do with how Samba interacts with the server.

When files/folders are created on a UNIX/Linux system, all permission
bits set minus your umask, which is usually 022.  In your case, 777 -
022 = 755.    Just type umask at a command prompt to see your umask

umask is set during system login and inherited during process
creation.  You could change your system wide login's umask setting
from 022 to 002 which would change the default to 755 for all new
files and folders created on the system.

A better alternate for you might be to specify an override in your
samba configuration for the specific share, I've found these settings
work best:

        path = /home/Example
        create mask = 0775
        force create mode = 0775
        directory mask = 0775
        force directory mode = 0775


More information about the CentOS mailing list