LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 01: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 01:31 AM.
 
Old 04-29-2015, 07:14 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

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

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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, 11:53 AM   #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, 12:31 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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, 08: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 08:54 PM.
 
Old 04-30-2015, 01:40 AM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

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



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 06:08 AM
ACL vs default ACL makupl Linux - Newbie 1 09-26-2013 01:11 AM
problem with samba and ACL ,ACL does not work as I want golden_boy615 Linux - Server 1 12-18-2011 09: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 08:13 AM
iptables acl versus cisco acl id_viorel Linux - Security 1 04-09-2008 05:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:32 AM.

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
Open Source Consulting | Domain Registration