By tingtong on
When I installed my Drupal 5.3 into PHP4 server, it ask to set to 777.
Now, I upgraded to server running in PHP5 and after installation, it help to set the folder "files" to 775.
So, what is the correct attribute for folder "files", 777 or 775?
Comments
If the server is setup
If the server is setup correctly the right permissions would be the most restrictive that still allows the server to write to the folders. For this the folders need to be owned by the user and grup that the webserver runs as. Usually uid/gid apache/apache for apache server. But actually 755 is a better permission for folders than either listed above.
My Drupal sites:
http://tutorialmasters.com
http://webservermasters.com
Would 775 be required for some hosts? Or should 755 work for all
Is there a way to tell what the UID is? Should that show in phpinfo()?
I've found on most of the sites I've worked on in the past few months (cPanel sites at Hostgator, Bluehost and MediaTemple (non-Grid)) that I need 775, at least. Would that be because the owner isn't the Apache user? (On my local dev systems, I can usually get it to work by setting group to "www" (OS X Tiger) or "_www" (Leopard) and giving it write access.)
Just looking at PHPInfo for my MAMP config, and I see values reported for "User/Group" and "User", and they're not entirely consistent. "User/Group" shows the web process, "User" shows my login username. That seems to me to make sense, based on how I've just said I set them up. If anybody who understands *nix permissions reads this, could they comment?