LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   change ACL (https://www.linuxquestions.org/questions/linux-newbie-8/change-acl-4175541082/)

byran cheung 04-29-2015 01:30 AM

change ACL
 
I have a folder , I use the below command .
Code:

#getfacl sis_group
and then get the result
Code:

group:sis1:rwx
would advise if I would like to change group from sis1 to sis2 , the getfacl result should be as below , what can I do ? thanks
Code:

group:sis2:rwx

sag47 04-29-2015 07:14 AM

setfacl is used to modify ACLs.

T3RM1NVT0R 04-29-2015 07:34 AM

sag47 is right, you have to use setfacl command to modify ACL. You might want to have a look at this: https://access.redhat.com/documentat...s-setting.html

byran cheung 04-29-2015 11:53 AM

Quote:

Originally Posted by sag47 (Post 5355030)
setfacl is used to modify ACLs.

I tried setfacl -m , but it only add the entry but not modify the entry , what advise how to do it ? thanks

T3RM1NVT0R 04-29-2015 12:31 PM

It should be something like:

Code:

setfacl -m g:sis1:--- <directory_name>
This will set acl on the given directory for sis1 group to be null that is no read, no write and no execute (this will only do it for top level, if you want to do it recursively that is for sub-directories using -R, check setfacl man page)

Next:

Code:

setfacl -m g:sis2:--- <directory_name>
Again if you want to do it recursively use -R.

byran cheung 04-29-2015 08:52 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 5355188)
It should be something like:

Code:

setfacl -m g:sis1:--- <directory_name>
This will set acl on the given directory for sis1 group to be null that is no read, no write and no execute (this will only do it for top level, if you want to do it recursively that is for sub-directories using -R, check setfacl man page)

Next:

Code:

setfacl -m g:sis2:--- <directory_name>
Again if you want to do it recursively use -R.

thanks reply
I tried the below method
Code:

setfacl -m g:sis2:--- <directory_name>
it will ADD entry g:sis2:--- , but not MODIFY the existing entry ( from sis1 changed to sis2 ) , would advise how to do the MODIFY ?

Thanks

T3RM1NVT0R 04-30-2015 01:40 AM

Copy pasting is bad :D

I copy pasted the command from the first instance I mentioned, it should look as:

Code:

setfacl -m g:sis2:rwx <directory_name>


All times are GMT -5. The time now is 09:52 PM.