View Single Post
Old July 25th, 2006, 6:15 PM   #9 (permalink)
cowboy
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
Quote:
Originally Posted by T313C0mun1s7
So let me see if I understand this correctly. The way the server is set up does not prevent you from setting the permissions higher that 755, it just won't let the php parse if it is higher?

That is a pain if it is true, because when I upload via FTP everything defaults to 777 and ZenCart is over 1900 files and I don't even know how many directories. I guess this might be a time to contact support and have then run a recursive chmod on my entire public_html directory.
What FTP program are you using? I cannot imagine one that would allow such a security risk. If it has a setting that controls default chmod set it to 755 for folders and 644 for files.

PHP running as CGI (PhpSUexec) will not allow initial creation of group or world write bits, nor, will it allow itself to set either bit after creation.

If you are uploading a tarball and extracting it on the server, it's contents will retain the permissions set at the time of taring.

The security feature of phpSUexec is to allow only the owner of a file to write, so if either group or world has a write bit, the CGI for PHP will halt in its tracks and deliver an error, usually 500. You can add write bits with FTP after file or folder creation, but, phpSUexec will refuse to honor them. That is your protection.

Since CGI needs an execute bit to run a file the apache OPTIONS directive ExecCGI adds an execute bit to all files, making a 644 file in effect 755. (Files pose no problem having a 755 permission.) Folders are not affected by the ExecCGI directive so have to be 755 to start with.

If all of your folders and files are in tact with 777 permissions, you can request support change them for you.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline   Reply With Quote