How to use setfacl on Solaris 8?

I have a directory with subdirectories and files that are owned by root:other.

I want to also allow another user (user01) full access (rwx) to the same directory/subdirectories and files and though I would user Solaris ACL to do this (setfacl and getfacl).

Additionally, I would still want all subdirectories and files to be owned by root:other (with rwx:r--).

How would I do this?

Who is Participating?
yuzhConnect With a Mentor Commented:
There is no -R switch with setfacl, If a directory has an ACL, the subdirectories underneath will not inherit this ACL.

you need to do:

find /path | xargs setfacl

find topdir -type d -exec setfacl {} acllist \;

man find
man xargs
man setfacl
to learn more details
Please have a look at the following doc (with examples):
    ACL Permissions for Directories:
    Whole doc (please read Access Control Lists (ACLs) ):

Here's another ACL tutorial (easier to understand):

or try Jfacl (GUI) tool:
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

tdsimpsoAuthor Commented:

Is it possible to set the ACL to be inherited by all subdirectories and files?
Do you know how to do this?

mmajereConnect With a Mentor Commented:
Perhaps a for loop in bash or ksh?

Assuming that example_file was already set up with the correct permissions you could try the following right at the command line

bash# for zz in `find {insert directory} -size +1` {enter}
>do {enter}
>setfacl -f example_file $zz {enter}
>echo "$zz has been changed" {enter}

This should modify every file with a size greater than -1 byte and run a setfacl command on it, setting the ACL equal to your example file.

Hope this helps..

tdsimpsoAuthor Commented:
Thanks all for you help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.