Solved

How to use setfacl on Solaris 8?

Posted on 2004-08-19
6
2,125 Views
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?

Thanks,
Troy
0
Comment
Question by:tdsimpso
  • 3
  • 2
6 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 11848246
Please have a look at the following doc (with examples):
    ACL Permissions for Directories:
    http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch18/407-410.html
   
    Whole doc (please read Access Control Lists (ACLs) ):
    http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ewtoc.html

   
0
 
LVL 38

Expert Comment

by:yuzh
ID: 11848771
Here's another ACL tutorial (easier to understand):
    http://www.cs.indiana.edu/Facilities/software/ACL.html
    http://supportweb.cs.bham.ac.uk/howto/unix/acls.php

or try Jfacl (GUI) tool:
   http://www.cs.bham.ac.uk/~nrs/jfacl/
0
 

Author Comment

by:tdsimpso
ID: 11851837

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

Thanks,
Troy
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Assisted Solution

by:mmajere
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}
>done

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..
:)














































0
 
LVL 38

Accepted Solution

by:
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

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

man find
man xargs
man setfacl
to learn more details
0
 

Author Comment

by:tdsimpso
ID: 12008721
Thanks all for you help.
Troy
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
llcommand 6 91
How to Change Interface on Cisco IOU 11 98
unix example issues 18 89
How to extract a string that have a given substring within in a line in a shell script 5 24
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

776 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