LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Permission on specific Directory / File to specific group (https://www.linuxquestions.org/questions/linux-desktop-74/permission-on-specific-directory-file-to-specific-group-4175474957/)

AbidDhanaiser 08-28-2013 01:14 AM

Permission on specific Directory / File to specific group
 
Hi all , group = G User =u Directory = D
now i have scenario , G1(u1,u2) , G2 , G3 , u3 , u4
G1 can read /write /execute D , but G2 and G3 cant Write but can read and execute D. u3 and u4 can't write but can execute and read , any solution

eSelix 08-28-2013 03:38 AM

If you have that kind of complication in permissions, then you colud use "acl". Then these rules can be easly invoked
Code:

chmod a= D # You can clear standard permissions if needed
setfacl -m  g:G1:rwx,g:G2:w,g:G3:w,u:u3:rx,u:u4:rx  D

You need to use filesystem which support acl, for example "ext" and mount it that it use it, for example
Code:

mount -o remount,acl /


All times are GMT -5. The time now is 11:19 AM.