2

I have created a group "restricted" and added a user "user1" to this group , how can I restrict this group to access some specified directory and drive.

New contributor
Anshuman Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • What do you mean with "restrict"? Do you want only the members but not anyone else to have access? Or do you want everyone but the members of the group have access? Two very different scenarios.
    – MLu
    Commented Jul 6 at 5:25

1 Answer 1

0

You can change the owner group of the directory.

chgrp -R <group_name> <directory_name>

-R - for recursive.

Replace <group_name> and <directory_name> with your actual group and directory names, respectively.

See man chgrp for more details.

2
  • That's not a complete answer. Apart from the group ownership change you should also discuss chmod to adjust the permissions. Just changing the ownership won't do what the OP wants to do.
    – MLu
    Commented Jul 6 at 5:24
  • @MLu: Good luck with that :)
    – v-lan
    Commented Jul 6 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .