Is there a way to recursively set all directories permissions to one thing and all files to another?

The reason that I ask is because I have a directory (and everything within it) on a website where non-script files (images, style sheets, PDFs, etc) are located and I want to ensure that a script file (PHP) cannot be placed in there and executed.

I tried removing execution from everything but have discovered that I then cannot cd into them. So, it appears that I need all of the directories to have execution, but not the files. Don't files inherit permissions from their parent directories though? So any new files would get execution permissions and my work would be for naught? How do people get around this?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to