Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AIX 5 --ACL applied - How to confirm if it worked programatically

Status
Not open for further replies.

gsgb1

Programmer
Jul 31, 2004
21
CA
In a shell script, I am applying ACL as follows:
aclput -i acl_file.txt $targetloc/$srcfile

and acl_file.txt looks like this -

attributes:
base permissions
owner(prj1): rw-
group(grp1): r--
others: r--
extended permissions
enabled
permit r-x u:ftpid

Question is- how do I programmatically find out that ACL is applied correctly for all (owner, grop, others) and extended permissions also worked fine. $? seems to give me 0 all the time (even when owner (prj1) does not exist).
Please help.
 
From the IBM documentation of Access Control Lists:

"The next three lines specify the base permissions. The owner and group names in parentheses are for information only. Changing these names does not alter the file owner or file group. Only the chown command and the chgrp command can change these file attributes.


Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

 
Thanks Rod for pointing to the right direction.

How do I make sure that ACL being applied worked correctly e.g. on extended attribute.
aclget filename can show me if the aclput worked or not by showing enable or disable?
Is there anyway to find out other than $?.

I am dealing with over 50-60 files when doing aclput on each file when copying from source to target directory.

Appreciate your help.

GSGB1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top