[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Good day/evening friends !!!!



On Mon, Aug 27, 2001 at 02:29:53PM -0400, Alan Shutko wrote:
> <shyamk@eth.net> writes:
> 
> > 1)Re: chmod :- What if you have , say 13 users and wish to single
> > out ONLY 1 of them , away from your file/directory ?
> 
> Make a new group (eg. noaccess).  Add the user you don't want to have
> access to that group.  Then
> 
> chgrp noaccess file
> chmod g-rwx file

This only works if the file if world-readable.  You end up with a file
whose permissions look like

  -rw----r--    1 myuser   noaccess     1589 Dec  6  2000 private-file

which isn't very intuitive to the new user.

My suggestion (and preferred solution) would be to create a
supplementary group (e.g "addgroup chosen12"), chgrp the file to that
group (e.g. "chgrp chosen12 private-file"), remove permissions for
"other" (e.g "chmod o-rwx private-file"), and add the 12 "allowed"
users to the new group (e.g. "for user in user1 user2 ... user12; do
adduser $user chosen12; done").  Don't forget to add yourself to the
new group as well.

Cheers,

-- 
Nathan Norman - Staff Engineer | A good plan today is better
Micromuse Ltd.                 | than a perfect plan tomorrow.
mailto:nnorman@micromuse.com   |   -- Patton

Attachment: pgpeFfXaElV20.pgp
Description: PGP signature


Reply to: