LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2015, 02:30 AM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
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

Last edited by byran cheung; 04-29-2015 at 02:31 AM.
 
Old 04-29-2015, 08:14 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,831
Blog Entries: 36

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
setfacl is used to modify ACLs.
 
1 members found this post helpful.
Old 04-29-2015, 08:34 AM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
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
 
Old 04-29-2015, 12:53 PM   #4
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
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
 
Old 04-29-2015, 01:31 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
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.
 
1 members found this post helpful.
Old 04-29-2015, 09:52 PM   #6
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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

Last edited by byran cheung; 04-29-2015 at 09:54 PM.
 
Old 04-30-2015, 02:40 AM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Copy pasting is bad

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

Code:
setfacl -m g:sis2:rwx <directory_name>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to change ACL mask to r-x for files to be created in directory faitrien Linux - Security 4 02-26-2014 07:08 AM
ACL vs default ACL makupl Linux - Newbie 1 09-26-2013 02:11 AM
problem with samba and ACL ,ACL does not work as I want golden_boy615 Linux - Server 1 12-18-2011 10:18 AM
Why does the ACL of a file created under a directory differ from the default ACL sctebnt Linux - Security 5 12-02-2011 09:13 AM
iptables acl versus cisco acl id_viorel Linux - Security 1 04-09-2008 06:00 AM


All times are GMT -5. The time now is 12:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration