LinuxQuestions.org
Help answer threads with 0 replies.
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 11-05-2012, 11:34 PM   #1
amar.sree
LQ Newbie
 
Registered: Feb 2012
Location: india
Distribution: Redhat
Posts: 18

Rep: Reputation: Disabled
setting ACL recursively


Hi All,

I was trying to set ACLS to folder recursively.
i had a folder /u02/adkv_objects with permissions set to 755

i had a user and i need to give him rwx to the folder recursively for existing files and for newly crating files and folders.

i have set acl by:
setfacl -R -m u:ghosh:rwx /u02/adkv_objects.

by ruuning the above commands folder permissions changed to 775 and user ghosh also not able to write in that folder.
getfacl output:
[root@LCORUPMDW01 adkv_objects]# getfacl /u02/adkv_objects
getfacl: Removing leading '/' from absolute path names
# file: u02/adkv_objects
# owner: oracle
# group: dba
user::rwx
user:ghosh:rwx #effective:r-x
group::rwx #effective:r-x
mask::r-x
other::r-x

[root@LCORUPMDW01 adkv_objects]#



pls share your suggestion for completing the task


Amar
 
Old 11-06-2012, 12:19 AM   #2
v11pandey
LQ Newbie
 
Registered: Oct 2012
Posts: 11

Rep: Reputation: Disabled
Hi

Hi amar,

you have used right command to set acl recursive for a folder, and it will change the folder permission to 755.
As per your command since ghosh is getting the user access for the folder he should be able to right in that.

Permission given by ACL command used by you will flow recursive to all sub folders and file under that folder.
But for newly created file or folder beneath parent folder acl permission will be different than you have set on Parent one.
To make active on newly created file you will have to run the same acl command you have used on the parent folder.
 
Old 11-06-2012, 12:26 AM   #3
amar.sree
LQ Newbie
 
Registered: Feb 2012
Location: india
Distribution: Redhat
Posts: 18

Original Poster
Rep: Reputation: Disabled
hi Pandey,
Thanks for the reply.

Every thing seems to be right but the user cant write in any of the folders and he is getting permission denied.

[root@LCORUPMDW01 u02]# getfacl adkv_objects
# file: adkv_objects
# owner: oracle
# group: dba
user::rwx
user:ghosh:rwx #effective:r-x
group::rwx #effective:r-x
mask::r-x
other::r-x


user:ghosh:rwx #effective:r-x althought it was showing full permission he cant write that was the bothering thing

and after setting acl permission changing from 755 to 775. it was another thing.


Amar
 
Old 11-06-2012, 12:28 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,357

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Actually, to have it affect future files, you need 'd'
Quote:
• Automatic ACL setting
• New files inherit default ACL (if set) from directory
• setfacl -m d:u:frodo:rw directory
 
Old 11-06-2012, 06:05 AM   #5
v11pandey
LQ Newbie
 
Registered: Oct 2012
Posts: 11

Rep: Reputation: Disabled
Hi Amar,

First remove the acl permission that you have set for adkv_objects by using below command
setfacl -b adkv_objects


then set acl by using command below
setfacl -m d:u:ghosh:rwx adkv_objects

By this you problem should be solved as below
1)Change of directory permisson to 775.
2)User ghosh was unable to right.

//
Regards
Vivek
 
  


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
Setting Sticky Bit recursively ONLY on directories CNBarnes Linux - Newbie 5 06-25-2010 01:33 PM
[SOLVED] set ACL recursively on a directory ?? vikas027 Other *NIX 4 08-30-2008 05:41 AM
setting acl in aix manoj.linux AIX 0 10-08-2007 10:31 PM
Need help setting up an ACL flibby Linux - Security 3 01-17-2006 10:21 PM
Setting permissions recursively ojbyer@usa.net Linux - General 4 12-15-2005 07:24 PM


All times are GMT -5. The time now is 08:54 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