Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Ubuntu 12.04 server and want to give full folder access say example: "Folder01" to group "Group01' and Limit "Group02" for read access only. How I can do this.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

If you want to restrict access to only two groups say Group01 full access and Group02 having only read only access, In this case you can use file access control list (ACL). (In your case I think itis the best solution)

setfacl -R -m g:Group01:rwx Folder01
setfacl -R -m g:Group02:r-- Folder01

You can verify changes via getfacl Folder01.And you can remove all permissions for others like this chmod -R o-rwx Folder01

So by this you folder is only accessible via Group01 ( full access ) and Group02 (read only access) and no doubt owner of that folder can also access that folder.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.