Skip site navigation (1)Skip section navigation (2)
Date:      19 Mar 2002 04:40:29 -0700
From:      Alex Rodioukov <simuran@shaw.ca>
To:        Richard <guyuan@telpacific.com.au>
Cc:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@freebsd.org>
Subject:   Re: How to disallow a certain user or group to access a directory and all other users will not be affected
Message-ID:  <87y9goss42.fsf@bismark.io.sys>
In-Reply-To: <200203191104.g2JB4VH56561@sydmail3.telpacific.com.au>
References:  <200203191104.g2JB4VH56561@sydmail3.telpacific.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Richard <guyuan@telpacific.com.au> writes:

> I am facing a problem that I only want to block a certain
> user or a group to access a few directories and all other
> users will not be affected.
> 
> It does not seem to be a problem in win2000, but I cannot
> implement in FreeBSD or Linux. Is it possible to implement
> in FreeBSD or Linux?

You'll need to create a group that will contain all the users that
should not have access to restricted directories. Then you'll need to
change the group id for that directories to the group you've
created. After you'll revoke all the permissions from the group - that
group will have no access. Like such:

# chgrp restricted dir1 dir2 dir3
# chmod g-rwx dir1 dir2 dir3

After this is done the users that belong to the "restricted" group
will have no access to dir1, dir2 etc... 

Regards,
  Alex.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87y9goss42.fsf>