What you need
You need three things from the user:
-
<DIR>
The top directory to change the permissions on
-
<ROLE>
The Role to be added. For instance atlas/Role=production or lhcb/lhcbprod
-
<LFCHOST>
The host which runs the lfc daemon for the VO
Finding the names of the directories
Before performing the changes one has to find the names of the directories affected. This should be done using the binary
lfc-find tool. For performance reasons it is better to run this command on the LFC host itself. You have to be careful as this entails running the command as root.
- Log on the host
- export the environmental variable $LFC_HOST
#export LFC_HOST=`hostname`
- source the grid environment
#source /afs/cern.ch/project/gd/LCG-share/sl3/etc/profile.d/grid_env.sh
#afs/cern.ch/project/gd/SC3/lfc-find/lfc-find <DIR> -type d | tee -a ./directories.out
Changing the ACL
For each directory you need to run the set-acl command
#for dir in `cat ./directories.out`; do /opt/lcg/bin/lfc-setacl -m
g:<ROLE>:rwx,m:rwx,d:g:<ROLE>:rwx,d:m:rwx ${dir}; done
-- Main.diana - 19 Oct 2006