Link to home
Start Free TrialLog in
Avatar of Swaminathan K
Swaminathan KFlag for India

asked on

Permissions on a directory Linux

Need help on setting permissions for a directory, new to linux.

I have a folder /opt/reports

I have users called user1 , user2  who loggin into linux and  read the contents of the files in this directory. I want to give read permission only to this user1 and user2 and rwx for others users.
Any help in this regard is really appreciated.
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, this depends on...

1) Your Kernel was build with ACL support.

2) Your Filesystem (stick with ext4 for this type of setup) has been built with ACL support enabled.

3) Your Filesystem (where /opt/reports lives) has been mounted with ACL support enabled.

4) Your Distro provides a packaged version of setfacl/getfacl you can install.

With Ubuntu, all these steps are done by default... for recent releases...

My suggestion is if you must do accomplish this type of setup, use Ubuntu, else you can end up spending days building Kernels + possibly Filesystem code.
Ubuntu, else you can end up spending days building Kernels + possibly Filesystem code.

You should be fine. You should be able to do this under most Linux distributions (Debian, Mint, Slackware, ETC)
Avatar of Swaminathan K

ASKER

Thanks a lot