Linux ACL issue

 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Linux ACL issue
# 1  
Old 03-22-2012
Linux ACL issue

Hi All,
I have an issue with linux acls, though I have implemented them I failed to foresee the issue.Now the server is in production and I would have to take down time to rectify it. And I hereby declare that this is not homework.

The situation is as such

I have a file system mounted with acl option

Code:
 
/dev/mapper/vg_A-DATAVOL_1  311G  110G  186G  38% /A/DATA

Under the /A/DATA directory I have 3 directories

I have four groups involved

Say group1,group2,group3,group4

Now the top directory /A/DATA needs to be as follows

Code:
rwx : group1(recursively) ,rx : group2, rx: group3, rx: group4

And the directory below the /A/DATA directory say DATA1 has to be

Code:
rwx:group2, rwx:group3 , rwx: group4

I have accomplished this by

Code:
 
setfacl -m g:group1:rwx,g:group2:rx,g:group3:rx,g:group4:rx /A/DATA
and
setfacl -m g:group2:rwx,g:group3:rwx,g:group4:rwx  /A/DATA/DATA1

Later,I have realized that all the newly created data under /A/DATA/DATA1 does not inherit the ACL's of parent directory (/A/DATA/DATA1).So to counter this I tried

Code:
setfacl -Rm g:group2:rwx,g:group3:rwx,g:group4:rwx /A/DATA/DATA1

All was ok and then I relaized that this was still nto working for anything newly created in /A/DATA/DATA1 and I have to schedule the above command in cron via a script

Code:
setfacl -Rm g:group2:rwx,g:group3:rwx,g:group4:rwx /A/DATA/DATA1

Yes, I have failed as I have not used default ACL ( the d option).

Any suggestions/guidance would be highly appreciated.

Thanks in Advance

---------- Post updated 03-22-12 at 02:53 PM ---------- Previous update was 03-21-12 at 10:48 PM ----------

Hi,

I have rectified most of the problem,Now Im stuck at one point where

I need to apply default acl to a directory say /a/abc/data

Here is what im doing

Code:
setfacl -Rm d:g:group1:rwx,d:g:group2,d:g:group3:rwx,d:g:group4:rwx /a/abc/data

The command is exiting cleanly and getfacl shows the following result

Code:
getfacl --tabular /a/abc/data
getfacl: Removing leading '/' from absolute path names
# file: a/abc/data
USER   user1 rwx  rwx
GROUP  groupm   rwx  rwx
group  group1      rwx
group  group2           rwx
group  group3           rwx
group  group4       rwx
mask             rwx  rwx
other            rwx  r-x

However when a user from group2 or group1 or group4 or group4 tries to write data he gets access denied.

Im I missing something.
# 2  
Old 03-22-2012
Do the groups have at least rx permission on /a directory? If not, they will not be able to get into the directory or do something like touch /a/abc/data.
# 3  
Old 03-22-2012
Yes they have

Yes, the groups in question have rx access at OS level. The directory in question is of 775 permissions
# 4  
Old 03-22-2012
Please post the result of "getfacl /A". What do you mean by "rx" permission at OS level? ACLs for the child directories are fine. I suspect that you have not set ACL for the groups on /A directory which is leading to the issue.
# 5  
Old 03-26-2012
Issue resolved.

Hi,

The issue is now resolved, I had to fine tune the ACL's by doing so

Have normal ACL's on ( /A) recursively and on the complicated ACL's ( /A/abc/data) I have set recursive ACL's. I have tested this over the data created over the weekend and all seems well.

Thanks you AllSmilie
# 6  
Old 03-27-2012
Thank you for letting us know how you solved your issue.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

VPN issue on Linux:

I was using PureVPN (with openvpn) on my windows machines and thought I'd try setting that up on linux mint 19.1 (xfce 32 bit). I followed complete installation process given on their website and all was working fine until I had to move the renamed config file into the openvpn folder. ... (2 Replies)
Discussion started by: ericaustin
2 Replies

2. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

3. UNIX for Dummies Questions & Answers

Issue with ACL's (Help/Advice Needed)

Hi Experts,,, Need your help/advice on how to fix this I have 2 users under same group (primary group) and i want to give 777 permissions on a directory to one dir owned by user1 when granted i can see than from getfacl but when i actually login as user2 i can touch a file . ... (3 Replies)
Discussion started by: maddyfreaks1
3 Replies

4. Windows & DOS: Issues & Discussions

Linux mount cifs with Windows ACL support

I'm in the process of migrating my windows file servers to a Ubuntu Samba server. My plan is to use cp -Rp to copy all the mounted files to the proper directory on my Ubuntu server. I can mount them just fine but if I run getfacl against a mounted directory its not showing any of my Windows... (0 Replies)
Discussion started by: binary-ninja
0 Replies

5. Solaris

ACL

Can i get the synopsis for add multiple users in single command for ACL access for a directory or a file thanks in advance dinu (3 Replies)
Discussion started by: dinu
3 Replies

6. Linux

ACL

Hi, I want to know what does the "effective" comment means in the output of the getfacl and whether it has to do with the acl mask... thanks (0 Replies)
Discussion started by: Gartlar
0 Replies

7. Red Hat

Linux Installation issue

Hi All, I had installed Red HAt Linux on Virtual PC. I completed installation and then 1 pop up asks for removing CD from drive and rebooting the system. I had done same. But afetr reboot nothing is displayed on the screen. What is the actual problem???? Kindly provide me the solution .... (1 Reply)
Discussion started by: sunray
1 Replies

8. Debian

How to enable and use ACL's in Linux

Hi, How to enable and use ACL's in linux. Thx, siva. (2 Replies)
Discussion started by: Sivaswami
2 Replies

9. Linux

setting acl on linux

Hi, while setting access control list I am getting error "Operation NOt Supported" Example :user A wants full access on test directory /home/user B/test, I dont want to add in secondary group bcz group has read permission, (1 Reply)
Discussion started by: manoj.solaris
1 Replies

10. Cybersecurity

ACL

Hi all, I've just been handled the responsibility for a FTP-site. Having no experiens of UNIX at all. And now one of my users needs to have full access to the usr directory and all it's subdirectories, don't know why just trying to do what the boss tells me. The type of UNIX is FreeBSD and the... (4 Replies)
Discussion started by: -tri-
4 Replies
Login or Register to Ask a Question