Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
7 posts Page 1 of 1
A common method of installing Couch (as well as other scripts) is to upload the installation zip onto the server and then use CPanel's Filemanager to 'expand' or 'extract' the zip.

This, of course, works but a common 'side-effect' seen on many servers is that the Filemanager does not set the proper permissions on files and folders extracted from the zip.

Ideally all files should have a 644 and folders should have a 755 permission but the Filemanager often simply goes ahead and sets 666 for files and 777 for folders, which makes them world writable - not good for security.

Some hosts like BlueHost take a strong stance on this situation and simply refuse to execute writable scripts. The browser shows a '500 Internal Error' while the web-server's error log reveals something like:
SoftException in Application.cpp:261: File "/home/xxx/public_html/couch/includes/ckeditor/ckeditor_v354.php" is writeable by group

The solution is to reset the files/folders to the proper permissions but it would be a daunting task indeed to manually do that using FTP client selecting individual files/folders.

I found an excellent script that automates this task for us.
It is a GPLed script originally coded for Joomla! but will work for every CMS, including Couch.
Download the attached 'sitescan.php' and place it within your 'couch' folder (or even your site's root if you have uploaded the entire site using the zip method).
Access it via your browser and select the proper options (select both 'files' as well as 'folders').
Once it has done its job, simply delete it from the server.

IMP: Finally, use your FTP client to manually reset 'couch/cache', 'couch/uploads/image' and 'couch/uploads/file' permissions to 777 as these folders legitimately require write access.

Attachments

Hi KK,
I used this script as per your instructions and all the permissions have been set as you mentioned.
But I'm still unable to access www.mysite.com/couch and getting a 403 forbidden error. I recently migrated to godaddy hosting. Please help.
Rachit, in that case the error is not due to incorrect permissions.
As to what the real reason is, for that you'll have to take a look at your web-server's error log.

Let us know what you find.
There is no error log in the sites error_logs folder. I have only set the permissions for the couch folder using this script. Do I need to set permissions for the entire site as well?

edit: I have managed to reach the login screen now, seems it was an error with the name of the index.php file, an underscore was added unknowingly by my computer when I copied it to the server, however it says the password is incorrect so I'm looking for a way to reset the super admin credentials.
Do I need to set permissions for the entire site as well?
Oh yes.
Please place the script in your site's root and execute it from there.

As for the error log, you'll probably be able to access it from the CPanel.
Ask your host about it if the error persists.
Can you please tell me how to reset the super admin username and password manually as the forgotpassword.php is simply redirecting me to my website.


edit: solved
I have solved the error with the access and now I'm able to do everything correctly. Thanks KK for your timely help. :)
7 posts Page 1 of 1