[oclug] shared user files question

David F. Skoll dfs at roaringpenguin.com
Wed Mar 6 09:32:47 EST 2002


On Wed, 6 Mar 2002, Derek Cunningham wrote:

> And alas, we encounter one of Unix's biggest downfall: the lack of access
> lists.

It's easy to work around, though.  You don't need ACL's for this
simple case.  And while ACL's are cool, they eventually become a bit
of a headache to manage.

Instead, use the common (Red Hat, Debian) trick of making each user a
member of his own group.  Then make a third group containing both
users.

In /etc/passwd:

user1:x:500:500:User 1:blahblahblah
user2:x:501:501:User 2:blahblahblah

In /etc/group:

user1:x:500:
user2:x:501
both:x:1000:user1,user2

Then put the files they both need to use in a directory owned by
group "both", readable and writable by group "both", and set the
sgid bit on the directory.  Magic... it works.

Regards,

David.




More information about the OCLUG mailing list