Here ya go.. when you're done with these, I have more :) They don't deal with folder permissions, but it's all stuff that needs to be considered when writing code
http://www.cgisecurity.com/lib/studyinscarlet.txt
http://www.cert.org/tech_tips/cgi_metacharacters.html
http://www.wiretrip.net/rfp/txt/rfp2101.txt
http://www.linuxfocus.org/English/November2001/article203.meta.shtml
Some aren't PHP specific but they still make for a good read :)