First, get familiar with the format of the files
/etc/passwd and
/etc/group:
Code:
head /etc/passwd
man 5 passwd
head /etc/group
man 5 group
A user is automatically a member of the group which is specified in his entry in file
/etc/passwd. In the following example, user
snave is user 3001, in group 3000:
Code:
snave:x:3001:3000:,,,:/u/snave:/bin/bash
But you can add user
snave to other groups, too. Suppose you also want him to be a member of group
business, which in this example is group 6000. In file
/etc/group, you'd start with
and change it to
Code:
business::6000:snave
If you want to have more than one user add this group as a supplementary group, you'd change that line to this instead:
Code:
business::6000:user1,user2,user3
Ok, so in your situation you want to define a new group whose purpose it is to define those who can change the directory in question. (You don't need to worry about
root, who can do anything.) Define a new group, picking a group ID which does not yet appear in file
/etc/group. Specify the names of users who should be able to modify the directory. In this example, we chose group ID 7654:
Code:
testgroup::7654:user1,user2,user3
Then all you have to do is this:
Code:
chgrp testgroup /wherever/testdirectory
chmod 775 /wherever/testdirectory # was 755 before
... and you're set.
Hope this helps.