The following only applies to those running SC development software on a linux server.
I have FastCGI setup on my server. This is becoming more common with other Cpanel webhosts like BlueHost or HostGator. On FastCGI systems all folders have permission 755 and files are set to 644 permission with the exception of executable files such as .so, .pl etc.
You never need permission 777 for folders on systems running php as FastCGI since on Cpanel scripts run as the actual Cpanel user instead of “nobody”. This really simplifies things in my opinion.
I’m writing this because it may help someone on the same setup.
The problem is a lot of zip install packages with have file and folder permissions set when you extract them. I’ve had this issue with zip install packages for linux from SC and others. The result is a lot of folders with permissions set to 777 and php files set to 755 when you extract. These permissions will not run on FastCGI at all and will generate a server misconfiguration error.
There are a couple of ways to handle this.
-
extract all files from the zip file on your computer and upload them by FTP to the server. Typically the correct permissions for folders and files will be set as they are uploaded. (this can take forever with SC btw)
-
A faster way is to upload the zip file, extract it on the server and use Filezilla to set the correct permissions for folders and files. Once the files and folders are expanded on the system open Filezilla and FTP to the site. Right click on the directory that has the installation with the messed up permissions after extraction. Choose “File Attributes” from the pop open menu. Near the bottom of the menu that opens you will see the option to “Recurse into subdirectories”. Enter 755 into the permissions box, check the Recurse option and choose “Apply to directories only”. Once filezillia is done (can take a while), repeat the process but this time set permissions to 644 and choose the option “Apply to files only”.
Now you have one more thing to do. With SC there are executable files located in devel/lib/third/zend. All of the files in that directory need to have permissions 755 to execute.
Last word: I’ve had permission issues on FastCGI with SC fresh install packages. But worst of all is this also sometimes happens with auto-update right from SC. The last time this happened I spent most of the day trying to get back up until I figured out that it was a permission issue, the one that really threw me as finding the executable in the zend folder.
BTW, if you have shell access (SSH) you could do the same thing faster through command line. A lot of people are on shared hosting running FastCGI and I wanted to cover how to do this without SSH access.
I’m hoping that this helps some one.