New files/directories having a specific group

Discussion in 'Linux Networking' started by Alex, Sep 18, 2003.

  1. Alex

    Alex Guest

    Hi folks,

    I've created a new Samba share where only 'mis' group members have
    access, but when someone creates a new file, Samba assigns that user's
    group as the owner. How can I get Samba to set 'mis' as the group
    owner for all files or directories created in the share?


    Alex, Sep 18, 2003
    1. Advertisements

  2. Alex

    m.marien Guest

    [share name]

    force group = mis
    m.marien, Sep 18, 2003
    1. Advertisements

  3. Alex

    Alex Guest


    Thanks for the info :) Worked great.

    Alex, Sep 20, 2003
  4. The unix way is to set the sticky group bit on the main directory of that
    share (like drwxrwsr-x).
    Walter Mautner, Sep 20, 2003
  5. Alex

    ynotssor Guest

    sgid != sticky bit. This is a very common error that seems to arise from the
    fact that the word sticky starts with an "s". The sticky bit has nothing to
    do with the set group id permission.

    The sgid perm you have indicated above is invoked via "chmod g+s dirname",
    and assigns the same group id of the dirname to all files created below that
    directory, and as such is the correct answer to the OP's question, but it is
    *not* called "the sticky bit."

    A "sticky bit" is denoted by a "t" in the world execute field of a directory
    permission, and is granted by a chmod +t dirname. See the output of "ls -l /
    /var | grep tmp" for an example. This assigns ownership of any file created
    in that directory to the user who created the file.

    The sticky bit on a parent directory allows only the owner of the file
    within that directory, the owner of the parent directory or the superuser to
    modify or delete the file.

    ynotssor, Sep 20, 2003
  6. Ah ... ok, just not native english speaker, I meant "sticky" is
    applicable also for "group sticky" :). Of course I know the "real"
    sticky bit.
    Greetings from Vienna :)
    Walter Mautner, Sep 21, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.