Unix Permissions: How to have groups collaborate in a directory

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
I have a team of 14 people who need to be able to collaborate on a website, some with access to most directories, some with access to only a few. How can I set it up so I just add permission for a directory, on a person by person basis.
Currently, even if I put them in the same group, when they save a file, its 755 so others in the group still couldn't work on it. Now even if I change the umask, and it saves the file 775, its still only for that user's 'primary' group. So everyone to have access would have to be in the same primary group, which doesnt give me the per-directory/per-user control I want.

ideas?

bart

edit: i can think of two ways that might work, sgid/suid or acl's, but the first seems to be 'hack job' and the second not very widely accpted/used.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
UNIX does not have a way to do this built in. Using acls is your only way to give user by user permissions. Of course, hopefully someone else has better ideas :p

(CVS maybe...)
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
What UNIX is it?

If it's Solaris you have "getfacl" and "setfacl".
If it's Linux it depends on the FS used.
It it's anything else, someone else can surely help you ;)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
reiserfs has no ACL support, maybe in the next revision but I wouldn't hold my breath.

If you can reinstall the OS I recommend XFS this time around, it's much more mature than reiserfs and has the ACLs you want.

I beleive if you use the sgid bit on directories the created files will have that group as their owner instead of the user's primary group, but don't quote me on that because it's been a while since I've had to look at something like this.
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
"If you can reinstall the OS"

Actually it hasn't even been instaled yet, so options are open.

"I recommend XFS this time around, it's much more mature than reiserfs"

really? my kinda informal thinking was that resier is the only one any distro's have commited themselves to.

"I beleive if you use the sgid bit on directories the created files will have that group as their owner instead of the user's primary group, but don't quote me on that because it's been a while since I've had to look at something like this. "

Yea, thats what I currently use on a different server, but it becomes a horkin pain in the ass to keep track of that many zillions of groups. (because you basically have to have one for every directory).

thanks for the info

bart
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< "If you can reinstall the OS"

Actually it hasn't even been instaled yet, so options are open.

"I recommend XFS this time around, it's much more mature than reiserfs"

really? my kinda informal thinking was that resier is the only one any distro's have commited themselves to.

"I beleive if you use the sgid bit on directories the created files will have that group as their owner instead of the user's primary group, but don't quote me on that because it's been a while since I've had to look at something like this. "

Yea, thats what I currently use on a different server, but it becomes a horkin pain in the ass to keep track of that many zillions of groups. (because you basically have to have one for every directory).

thanks for the info

bart
>>



If I remember correctly (and I may not since I do not keep up with journaling file systems since I am a BSD snob ;)), XFS is the SGI journaling file system. So it has had years of maturation on SGI systems.
IRIX, thats what its called :p
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Actually it hasn't even been instaled yet, so options are open

That's always a good thing.

really? my kinda informal thinking was that resier is the only one any distro's have commited themselves to.

Well I believe Mandrake 7.2 shipped with XFS as an option, but I don't consider distro acceptance as a determinate of stability. Mandrake ships reiserfs, RedHat doesn't but does ship ext3, so which is more mature? It really comes down to who you think has the better judgment there, RedHat or Mandrake.

Anyway Linux XFS is compiled from the same code base used on Irix and very little has changed during the port other than Linux specific things (like the pagebuf stuff from Irix they ported too) so it's technically been tested for years. And the userspace tools (mkfs, fsck, dump, etc) are light years ahead of what reiserfs offers. And since XFS is a traditional inode based filesystem it works fine with NFS, software RAID, and everything else on Linux, reiserfs has run into problems several times because they do things very differently.

And if you want, you can put the XFS journal on an external device, say a flash memory card, so the journaling won't affect performance of the filesystem it's journaling at all. For a busy disk this would be a really nice feature.

I like reiserfs as an innovative filesystem and it will probably be very prominent in the future, but I still think it's way too young to trust real data to.
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
SGI has an XFS section on their site.
You can download kernel patches, as well as RedHat images that have been modified to allow for XFS installations.

[edit] Well Im bored so I looked it up, it's Right here. [/edit]
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
SGI also has a CVS server that tracks 2.4.X and the new 2.5.X if you want/need the very latest kernels.