To set permission of all file on particular folder you can use below command. for example you have chmod 755 all .cgi files in cgi-bin you can use this
chmod -R 755 *.cgi
chmod -R 755 *.cgi
Comment