[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2139
  • Last Modified:

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?

Thanks,
Troy
0
tdsimpso
Asked:
tdsimpso
  • 3
  • 2
2 Solutions
 
yuzhCommented:
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
 
yuzhCommented:
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
 
tdsimpsoAuthor Commented:

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mmajereCommented:
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
 
yuzhCommented:
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
 
tdsimpsoAuthor Commented:
Thanks all for you help.
Troy
0

Featured Post

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now