xfs
[Top] [All Lists]

Re: Anyone using XFS ACLs?

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Anyone using XFS ACLs?
From: Johannes Stickel <johannes.stickel@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Jul 2001 15:51:04 +0200
References: <Pine.LNX.4.33.0107201739460.6834-100000@gusi.leathercollection.local>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.1) Gecko/20010607
Hi,

Federico Sevilla III wrote:

I hope my rephrasing my questions will help me get some answers.

What needs to be done:

 o Set the ACLs of a pretty large tree of files and directories
recursively.

afaik there is no way to do that directly. Therefore I've written a tiny script(attached below). There may be a many better ways to do it, but it works fine for me ;-)

 o Find out how to manage ACLs for easy addition/removal of particular
user privileges on a per-subtree/branch basis again recursively.


I just copy the old acl, and add/remove the privileges, i want to
change. If you don't like this method, take a look at the sed manpage...


 o Get some tips from those who have already implemented ACLs for a large
data share (something like what Samba can provide although to be accessed
locally or via NFS).


Well, this is a bit tricky. You may want to take a look at

http://acl.bestbits.at/man/acl.5.html#DETERMINING%20ACCESS


The problem is the ACL_MASK, which is affected by the create mode. Thus you have to use a


------------------------------------------------------------------------


#!/bin/bash

export acl=$1
export dacl=$1

function foreach()
{
   for name in *
   do
        if [ -d "$name" ]
        then
         chacl -b $acl $dacl "$name"
         cd "$name"
         foreach
         cd ..
        else
          chacl $acl "$name"
        fi
        
   done
}

if [ -z $2 ]
then
echo "usage: mchacl acl directory";
exit
fi

chacl -b $acl $dacl $2
cd $2
foreach
cd ..



<Prev in Thread] Current Thread [Next in Thread>