1832928 Members
2647 Online
110048 Solutions
New Discussion

ACL

 
John McDen
Regular Advisor

ACL

I am not sure how to use acl's

Need to give a user xyz access to the following dir.

drwxr-xr-x appl dba reports

how should I go about using acl's ??

New to HP
13 REPLIES 13
Helen French
Honored Contributor

Re: ACL

Try this:

# cd dir_name
# chacl 'xyz.%=rwx' reports
# lsacl reports (for checking)

xyz.% - the first part in the user name. 'rwx' is the permission.

If you want to give group permission, for group 'abc', then:

# chacl '%.abc=rwx' reports
# man acl (for details)
Life is a promise, fulfill it!
PIYUSH D. PATEL
Honored Contributor

Re: ACL

Hi,

try these:
man acl
man chacl
man setacl
man getacl
man lsacl


Piyush

S.K. Chan
Honored Contributor

Re: ACL

For JFS filesystem you would use .. "setacl" and "getacl" for example .. (directory "test" in /opt)

# cd /opt
# getacl test
=file: test
=owner: root
=group: sys
user::rwx
group::r-x
class:rwx
other:r-x
# setacl -m user:skchan:rwx test
# getacl test
=file: test
=owner: root
=group: sys
user::rwx
user:skchan:rwx
group::r-x
class:rwx
other:r-x

Man "setacl" for more details ..

John McDen
Regular Advisor

Re: ACL

hello shiju

When I tried chacl it gave me an error
(chacl 'xyz.%=rwx' report)

Function is not available (errno = 251)

New to HP
S.K. Chan
Honored Contributor

Re: ACL

The chacl command does not work on vxfs. Use "setacl" instead.
Helen French
Honored Contributor

Re: ACL

John,

As S.K said, the 'chacl' command will be replaced with 'setacl' command on vxfs file systems. You can use 'getacl' instead of 'lsacl'
Life is a promise, fulfill it!
John McDen
Regular Advisor

Re: ACL

when I try setacl it gives

sh: setacl: not found.

Do I need to install something to get this working..???

New to HP
John McDen
Regular Advisor

Re: ACL

I have B3929BA HP OnLineJFS (Advanced VxFS)



New to HP
Helen French
Honored Contributor

Re: ACL

What is the file system version ? JFS 3.3 ? Check it with:

# fstyp -v /dev/vg??/lvol?
Life is a promise, fulfill it!
John McDen
Regular Advisor

Re: ACL

Output of fstyp

vxfs
version: 3
f_bsize: 8192
f_frsize: 1024
f_blocks: 7692288
f_bfree: 1649036
f_bavail: 1545972
f_files: 493152
f_ffree: 412256
f_favail: 412256
f_fsid: 1073807373
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 6
f_size: 7692288
New to HP
Helen French
Honored Contributor

Re: ACL

You may need to upgrade the file system layout to 4 in order to use ACLs:

# vxupgrade -n 4 -r /dev/vg00/rlvol4 /tmp ( for /tmp file system)

Check this document too (TKB #2200131019):

http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000056413901

Life is a promise, fulfill it!
S.K. Chan
Honored Contributor

Re: ACL

To determine if you have at least JFS 3.3,
# swlist -l fileset JFS
After installing 3.3 the FS layout has to be upgraded to version 4. You do want to check out the online doc on JFS's ACL also..
http://www.docs.hp.com/hpux/onlinedocs/os/jfs_acl.pdf