Hi,
I did the following script:
DIR=`pwd`;for i in `find . -name GESTION -type d`;do cd $i/..;setfacl -R -m g:directores:rwx,
GESTION;echo $DIR'/'$i;cd $DIR;done
This code do the following actions:
- Starting inside a folder, it's searching for any folder called "GESTION"
- Every time a folder called "GESTION" is found, then the script move to its parent folder, and then it applies ACL permissions to the folder GESTION by using the command setfacl.
The problem is that the script doesn't works when there was found a folder with a blank space in its name.
I mean:
/dir1/dir2/dir3/GESTION --> this works fine
/dir1/dir2/dir 3/GESTION --> this doesn't works
/dir1/dir2/dir3/2. GESTION --> this doesn't works
Thank you for your help.