Protecting web directories.

What’s the fastest way to chmod all current web directories to 711?

Basically I’m trying to protect my directories from being listed in a web browser. I just finished doing a “chmod 711 dirFileName” to all of the web directories in my site. I did it the hard way by doing chmod 711 to each directory I have. The problem now is that I have a bigger site to do and I don’t want to sit here all night.

Another question I have is how do I automatically set the permissions for each directory I create? Is there a way to get umask to work with directories only?

Finally, am I blocking out anyone or anything I shouldn’t be by doing this? It seems to be working fine so far but I don’t want to be blocking robots or users from my site.

Thanks in advance!

 

 

 

 

Top