Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

How to use setfacl on Solaris 8?

Posted on 2004-08-19
Last Modified: 2013-12-21

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?

Question by:tdsimpso
  • 3
  • 2
LVL 38

Expert Comment

ID: 11848246
Please have a look at the following doc (with examples):
    ACL Permissions for Directories:
    Whole doc (please read Access Control Lists (ACLs) ):

LVL 38

Expert Comment

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

or try Jfacl (GUI) tool:

Author Comment

ID: 11851837

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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


Assisted Solution

mmajere earned 100 total points
ID: 11856247
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..

LVL 38

Accepted Solution

yuzh earned 400 total points
ID: 11866954
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

Author Comment

ID: 12008721
Thanks all for you help.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Shell script errors 10 141
remove a combination of patterns from a file 15 70
Can I delete authorized_keys in FreeBSD 1 99
What are recommended OS for exim mail server? 10 113
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question