View Single Post
Old 03-24-2004, 11:30 AM   #3 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 131
Epsilon is on a distinguished road
Re: top sites php help

Quote:
for step 2 & 3 it tells me to change it to 777 but i read on a post somethwere thats thats bad... what do i do?
777 makes the script both world writable and executable. That's a really bad idea for CGI scripts, but not such a big deal with PHP. However, since most servers don't require PHP file permissions to have the execute bit set, I would use 666 instead of 777. This will still give you write permission.

Better yet, you might even try setting the files to 664. That makes them writable by the owner and the group, but not the public. Depending on how your server is configured, this may or may not work. If your web server is able to write to the files with group permissions, 664 is the best permission setting. Otherwise go with 666. Although it's slightly less secure, it should work fine.

777 is not necessary unless your web server requires PHP scripts to be set as executable (rare) AND the particular files being written to have executable PHP code. They probably don't. My guess is these files just contain configuration variables.

One last note: Any files that don't need to be written to by the server, set them to 644. No sense in giving extra write permissions that aren't needed.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote