Monday, June 24, 2013

user permissions

I have created 2 users both are member of apache group. I want to setup user 'a' can not travel /home/b also can not see any directory or file of user b. Also same configuration of user b, /home/a/www and /home/b/www folder contains for website. Web must be run 
i don't want to setup jailkit or other software .How to setup it ?


by default in redhat normal users can't travel and see other users file but 
if in your case this problem is occuring then 
There are two methods 
1.) check the permissions of folder of a and b 
i.e. do ls -l /home 
it will show you permissions 
like 
rwxr-xr-x a a /home/a 
rwxr-xr-x b b /home/b 

now change permissions by using chmod command 
chmod 751 -R /home 

This will make the files execute only for others and will not be readable 
for other users. 

Now lets come to 2nd Method 

2.) use setfacl Command 
setfacl -m user:a: --- /home/b 
setfacl -m user:b: --- /home/a 

this will give special restriction so that no one from a and b can peek into 
each other folder and this is the best one.better try setting ACL


0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM