Topic: What are the dangers of setting directory to 777? (Read 2567 times)
Hehe. I made your website....
Posts: 85
194 credits Members referred : 0
FunAndEducational.com
« on: Oct 27, 2007, 09:13:44 pm »
I'm looking for articles or explanation as to the dangers of setting a directory to 777. Are there times when it is necessary to set to 777? Such as when PHP has to write to directory for example?
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5779
46271 credits Members referred : 3
« Reply #1 on: Oct 27, 2007, 09:17:22 pm »
php can write a directory if the apache user (or any other user that php runs as) has rights to write.
So the correct command would be :
Code:
chmod apache:apache /path/to/dir
On the other hand you may not have access to run this command, so a chmod 755 will be probably ok.