fixperms on folders in shell script

Hi,

I am using fixperms command to change permissions of diretories in my script, i have to change 3 directories permissions one by one using fixperms.

i tried the below code

code:

exec DIR1/fixperms -rRy DIR1
exec DIR2/fixperms -rRy DIR2
exec DIR3/fixperms -rRy DIR3

but this is not working, :wall: after executing the first command the script is terminating :(..

please help me how to change 3 directories permissions one by one ?

Your exec is a shell command that uses the shell's own process for the child, and the shell is then no longer running. Drop it.

for DIR in DIR1 DIR2 DIR3 DIR4 .......
do
  fixperms -rRy $DIR
done

Where's the right man for fixperms? I found fixperm(1M) but it does not take a dir, it takes a specfile.

O/P might have been referring to fixperms.sh from old MySQL kit ?