How To
Summary
Steps to use extended ACLs to grant access to users in multiple groups.
Objective
Problem: The system has thousands of users, so the administrator cannot add all users to one group to manage directory access. Extended ACLs can be used to grant access to users in different groups.
The following steps demonstrate how to use ACLs to allow multiple group access to a file or directory.
Steps
The following example has 2002 users. The objective is to allow /myDir access for users in Xgroup1 and Xgroup2.
|
Xgroup1: 2000 users (testuser1000-testuser3000)
Xgroup2: testuser3001
Xgroup3: testuser3002
|
|
# export EDITOR=/usr/bin/vi
# acledit /myDir *
* ACL_type AIXC * attributes: base permissions owner(root): rwx group(system): r-x others: r-x extended permissions disabled Change to:
*
* ACL_type AIXC * attributes: base permissions owner(root): rwx group(system): r-x others: --- extended permissions enabled permit rwx g:Xgroup1 permit rwx g:Xgroup2 |
2) Verify the new permissions.
| # ls -ld /myDir drwxr-x--- 2 root system 256 Nov 01 19:33 /myDir |
|
# aclget /myDir
*
* ACL_type AIXC * attributes: base permissions owner(root): rwx group(system): r-x others: --- extended permissions enabled permit rwx g:Xgroup1 permit rwx g:Xgroup2 |
3) Test with users from all three groups.
| # chuser umask=077 testuser3001 |
|
# su - testuser3001
$ id
uid=3700(testuser3001) gid=211(Xgroup2) |
| $ touch /myDir/file3001 $ ls -aln /myDir/file3001 -rw------- 1 3700 211 0 Nov 26 17:14 /myDir/file3001 |
| $ cat /myDir/file3001 cat: 0652-050 Cannot open /myDir/file3001. |
- Who can access /myDir?
- All users in Xgroup1 and Xgroup2
- Users in root.system, with basic ACLS.
|
# acledit /myDir
Change group acls:
attributes:
base permissions owner(root): rwx group(system): --- others: --- |
|
# aclget /myDir
base permissions
owner(root): rwx group(system): --- others: --- extended permissions enabled permit rwx g:Xgroup1 permit rwx g:Xgroup2 |
Now, only Xgroup1 and Xgroup2 members can access the directory.
Additional Information
| SUPPORT |
|---|
|
If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract. 1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue. 2. Capture any logs or data relevant to the situation. 3. Contact IBM to open a case: -For electronic support, see the IBM Support Community: 4. Provide a clear, concise description of the issue. - For more information, see: Working with IBM AIX Support: Describing the problem. 5. If the system is accessible, collect a system snap, and upload all of the details and data for your case. - For more information, see: Working with IBM AIX Support: Collecting snap data |
Related Information
Was this topic helpful?
Document Information
Modified date:
26 November 2021
UID
ibm16519910