Search code examples
linuxshared-directory

Create a group shared directory


So I got the directory "shared". A group named "Workers" And I got 2 users "Bob" and "An". They both have "Workers" as group. How do I make it so that they both can share in Workers. But only users of the group "Workers".


Solution

  • Make sure the directory is part of the Workers group. Make sure it is usable by the group.

    chgrp Workers shared
    chmod g+rwx shared
    

    You may want to add the t flag (based on John Hascall's comment)

    chmod g+rwxt shared