FAQ
A problem that has plagued me for a long time (finally decided to get
some expert help) is setting the owner/group on directories/files I
create with samba. Here is my situation:

On my Linux/Apache I have a user, smith. The /home/smith directory is
owned by smith and is part of the group, todd (me) with permissions 775.

This works fine until I create via samba a directory in smith e.g.
/home/smith/test. The directory is owned by todd and smith cannot
create a file in it.

What have I missed and how do I fix it?

Todd

P.S. My admin expertise is just moderate since my Linux server just runs
and runs without much administration needed.

--
Ariste Software
Petaluma, CA 94952

http://www.aristesoftware.com

Search Discussions

  • Rob Kampen at Jul 12, 2010 at 11:01 am

    Todd Cary wrote:
    A problem that has plagued me for a long time (finally decided to get
    some expert help) is setting the owner/group on directories/files I
    create with samba. Here is my situation:

    On my Linux/Apache I have a user, smith. The /home/smith directory is
    owned by smith and is part of the group, todd (me) with permissions 775.

    This works fine until I create via samba a directory in smith e.g.
    /home/smith/test. The directory is owned by todd and smith cannot
    create a file in it.

    What have I missed and how do I fix it?

    Todd

    P.S. My admin expertise is just moderate since my Linux server just runs
    and runs without much administration needed.
    Todd,
    You did not provide a copy of your smb.conf
    you may want to check
    directory mask = 0775
    create mask = 0664
    in the global section or in the particular [homes] section as you see fit.
    another way is to use the sticky bit under unix file permissions
    ie
    chmod g+s /home/smith
    HTH
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: rkampen.vcf
    Type: text/x-vcard
    Size: 196 bytes
    Desc: not available
    Url : http://lists.centos.org/pipermail/centos/attachments/20100712/e1e51a11/attachment.vcf
  • Todd Cary at Jul 12, 2010 at 11:33 am
    Rob -

    I assume this is where I need to list all users and set the permissions
    as specified. Also, I do not find an entry for "directory mask".

    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users.
    In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765

    Todd
    On 7/12/2010 8:01 AM, Rob Kampen wrote:
    Todd Cary wrote:
    A problem that has plagued me for a long time (finally decided to get
    some expert help) is setting the owner/group on directories/files I
    create with samba. Here is my situation:

    On my Linux/Apache I have a user, smith. The /home/smith directory
    is owned by smith and is part of the group, todd (me) with
    permissions 775.

    This works fine until I create via samba a directory in smith e.g.
    /home/smith/test. The directory is owned by todd and smith cannot
    create a file in it.

    What have I missed and how do I fix it?

    Todd

    P.S. My admin expertise is just moderate since my Linux server just
    runs and runs without much administration needed.
    Todd,
    You did not provide a copy of your smb.conf
    you may want to check
    directory mask = 0775
    create mask = 0664
    in the global section or in the particular [homes] section as you see
    fit.
    another way is to use the sticky bit under unix file permissions
    ie
    chmod g+s /home/smith
    HTH


    _______________________________________________
    CentOS mailing list
    CentOS at centos.org
    http://lists.centos.org/mailman/listinfo/centos
    --
    Ariste Software
    Petaluma, CA 94952

    http://www.aristesoftware.com

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.centos.org/pipermail/centos/attachments/20100712/a49e5d25/attachment.html
  • Mogens Kjaer at Jul 12, 2010 at 11:39 am
    On 07/12/2010 05:33 PM, Todd Cary wrote:
    ....
    Also, I do not find an entry for "directory mask".
    You could add one :-)

    Mogens

    --
    Mogens Kjaer, mk at lemo.dk
    http://www.lemo.dk
  • Bowie Bailey at Jul 12, 2010 at 11:44 am

    On 7/12/2010 11:33 AM, Todd Cary wrote:
    Rob -

    I assume this is where I need to list all users and set the
    permissions as specified. Also, I do not find an entry for "directory
    mask".

    # The following two entries demonstrate how to share a directory so
    that two
    # users can place files there that will be owned by the specific
    users. In this
    # setup, the directory should be writable by both users and should
    have the
    # sticky bit set on it to prevent abuse. Obviously this could be
    extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    The samples do not list every possible option -- just the common ones.
    There is lots of good configuration info in the man page. Here is a web
    version:

    http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html

    --
    Bowie
  • Todd Cary at Jul 12, 2010 at 11:51 am
    Many thanks!

    Todd
    On 7/12/2010 8:44 AM, Bowie Bailey wrote:
    On 7/12/2010 11:33 AM, Todd Cary wrote:

    Rob -

    I assume this is where I need to list all users and set the
    permissions as specified. Also, I do not find an entry for "directory
    mask".

    # The following two entries demonstrate how to share a directory so
    that two
    # users can place files there that will be owned by the specific
    users. In this
    # setup, the directory should be writable by both users and should
    have the
    # sticky bit set on it to prevent abuse. Obviously this could be
    extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    The samples do not list every possible option -- just the common ones.
    There is lots of good configuration info in the man page. Here is a web
    version:

    http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html
    --
    Ariste Software
    Petaluma, CA 94952

    http://www.aristesoftware.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedJul 12, '10 at 10:48a
activeJul 12, '10 at 11:51a
posts6
users4
websitecentos.org
irc#centos

People

Translate

site design / logo © 2022 Grokbase