Setting File Permission

Can we all please agree to stop doing this?  From here.
sudo chmod 0777 /var/cache/eaccelerator
Why in the world would you do this? It is  saner and more secure to set the directory owner to the user your web server runs as.  Yes, in this case it probably won’t make much difference, but I don’t know how many times I’ve seen tutorials and forum posts that state, “oh, just run chmod 777 on that directory”

I understand that making your tutorials easy to follow is important.  Still, could we all at least make an effort to recommend that instead of running chmod 0777, that the user change the ownership to the appropriate user or group?

Oh and in the case of the above tutorial, the appropriate command should have been:
sudo chown www-data
Then, only root and the webserver have write access to the directory.  Much better than allowing everyone full access.

Post to Twitter Post to Twitter Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook Post to StumbleUpon Stumble This Post

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

Additional comments powered by BackType

This work by Conner McCall is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License