I need to know what the right FTP permision is for PHP files on a normal LAMP server? I heard about the linux permision rules and how to modify them using chmod but what are the dangers for a normal user like my client?
For instance, if he modified a PHP file with Filezilla to 777 is the world really allowed to write to the file? Thanks for your help and advises.
short answer 755 - it would make the file executable + readable for group and world, while writable for owner only
long answer: it depends on the file itself. usually executable code (php, ruby, perl, python) is set to 755 so that it can be executed by the web server. you can use this http://www.onlineconversion.com/html_chmod_calculator.htm to calculate permissions, most FTP clients have this (I believe at least CuteFTP on windows does have it).