Topic: What are the dangers of setting directory to 777? (Read 469 times)
I will send you to /dev/null/
Posts: 78
140 credits Members referred : 0
FunAndEducational.com
« on: Oct 27, 2007, 10: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: 7975
40807 credits Members referred : 3
« Reply #1 on: Oct 27, 2007, 10: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.