Can someone steal or change my PHP files if I have set them to chmod 777?
I have an EC-2 instance and even when I’m logged in as EC2-user I cant change my file if I have set them to chmod 755. I can only make changes to the file when I have set them to chmod 777.
Yes and no. Can anyone who is viewing the files over the net? No. However, anyone with the ability to log on to your machine could change the files (since they are world readable / writable.) In general, this isn’t a good practice. I’d advise not permitting more than 775. If you are in a hosted environment, this shouldn’t be a problem though.