PHP

ID #6

Do I need to set any 777 permissions in order for my PHP scripts to create files and directories?

Applies to: Grid System

Your PHP scripts run with your permissions and so functions like copy(), mkdir(), and fopen()/fclose() will create directories and files owned by you. Therefore, if you have write permission, then so will your PHP scripts. So there is no need to set permissions 777 on any file or directory.

This contradicts the README and INSTALL documentation that accompanies many PHP packages, due to the fact that most of those packages assume you're running PHP in safe mode mode rather than in CGI mode.

On the Modwest grid hosting system, there is never any reason to use 777 permissions.


Last update: 2010-09-27 15:22
Author: FAQ Admin
Revision: 1.2

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 4.5 (4 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ

Comment of Anonymous:
A great tutorial for UNIX permissions can be found here: http://catcode.com/teachmod/

Added at: 2005-03-16 16:40