1820661 Members
2427 Online
109626 Solutions
New Discussion юеВ

ACL add and remove..

 
amonamon
Regular Advisor

ACL add and remove..

helloo..

I was doing some setfacl on one file..somewhere on google I found how to add acl but now I can not figure how to remove it..

I have this:
drwx--l---+ 2 1002 1002 512 Feb 27 08:53

I as root can read it

Also..I would love if someone can help me how to add command so that only root and certan user can acces certain folder..to add acl

thanks in advance...

cheers
9 REPLIES 9
Peter Godron
Honored Contributor

Re: ACL add and remove..

Hi,
you have already started if you have used the setacl command!

"man setacl" shows you the options:
-m to add/mod entries
-d to delete entries

The man example:
setacl -m user:archer:r-- filea

so for you somthing like:
setacl -m user:root rwx folder
You need at least execute (001) to access a directory.

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.


amonamon
Regular Advisor

Re: ACL add and remove..

no..this command can not be executed..

setacl -m user:root rwx folder


I did read man setfacl but it did not help a lot..

Peter Godron
Honored Contributor

Re: ACL add and remove..

Hi,
as you have read the man pages, you will have found the correct format:
# setacl -m u:root:rwx folder

So you would set the normal permissions on the folder with chmod and then add your individual users.

amonamon
Regular Advisor

Re: ACL add and remove..

hmm..still it is foggy to me...

OK files and folders that have ACL have little + near premissions..

how to remove ACL?? I can tell it is something with -d but as root I can not execute it..maybe I hit wrong commnad..

thanks
amonamon
Regular Advisor

Re: ACL add and remove..

I did this:

setfacl -r -d u:root:rwx filename

but nothing happens...
Dennis Handly
Acclaimed Contributor

Re: ACL add and remove..

>I can tell it is something with -d

That's what it says.

>I did this:
setfacl -r -d u:root:rwx filename

Try: setacl -d u:root:rwx filename
amonamon
Regular Advisor

Re: ACL add and remove..

I do not have setacl commnad..

I have only setfacl and getfacl I guess it is same...
I set acl with setfacl and it has restriction..but problem is how to remove now acl and make that folder regular..

thanks in advance..
Dennis Handly
Acclaimed Contributor

Re: ACL add and remove..

>I do not have setacl command.

It might be helpful if you can explain how you are not on HP-UX? and what you are on?

Peter and I have assumed you are on HP-UX and just have typos.
amonamon
Regular Advisor

Re: ACL add and remove..

First let me say sorry for not telling U prompt that I am on Solaris...

Thanks