Hi,

Anyone that has a project hosted on Sourceforge.net has available to them a free hosting service as part of their “project features”. Recently I have been involved in the project Updater-G and was asked to help look at a Joomla installation to make content addition easy.

One problem we faced, which would have been a show stopper, was that Joomla could not successfully upload images or write file settings from the administration panel. Not even setting 777 permissions on the files and folders worked.

A comment related to installing Drupal on Sourceforge’s hosting platform raised a potential solution.

Basics: Understanding SourceForge Hosting

The project servers consider the “htdocs” folder in a different “space” and hence you don’t get to write to this folder, or it’s subfolders. However, in the project directory (/home/groups/P/PR/PROJECTNAME) you have a folder called “persistent”. This folder consists of writable space, that you can use to install Drupal.

Insight: Understanding the “ln” command (Unix)

The “ln” command in Unix is used to create a symbolic link, which is very close to what we call “shortcuts” in Windows. So the approach to be followed here is to mirror all writable folders in the “htdocs” folder into the “persistent” folder mentioned above.

You don’t need to copy/recreate all folders, just the writable ones would do.

Final: The Process

Install Drupal on your SourceForge.net server space in the “htdocs” folder (unzip all files there). Go to the folder “sites/default” and open the file “default.settings.php” in a text editor. Now, copy the contents of this opened file into another file, and name it “settings.php”. Save “settings.php” on your desktop.

Then, login to the project shell space using PuTTY (Follow this article for an excellent guide to configuring PuTTY for SourceForge.net). Execute the following instructions:

$ cd /home/groups/P/PR/PROJECTNAME/persistent
$ mkdir sites
$ chmod 0777 sites
$ cd sites
$ mkdir default
$ chmod 0777 default
$ cd default
$ mkdir files
$ chmod 0777 files
Now, upload the files “settings.php” to “/home/groups/P/PR/PROJECTNAME/persistent/sites/default/”. Once the file is uploaded, execute the following instructions in PuTTY:

 

$ cd /home/groups/P/PR/PROJECTNAME/persistent/sites/default
$ chmod 0777 settings.php
Now we proceed to creating the symbolic links. Execute the following instructions in PuTTY:

 

$ cd /home/groups/P/PR/PROJECTNAME/htdocs/sites/default
$ ln -s /home/groups/P/PR/PROJECTNAME/persistent/sites/default/settings.php
$ ln -s /home/groups/P/PR/PROJECTNAME/persistent/sites/default/files

Closing

Your Drupal installation should work fine now. Remember, once you are done with the installation, you should change the permissions of all folders from 0777 to 0644.

For our install we created the directories listed below and gave them 0777 permissions, then copied the configuration.php and content for all the created folders to the persistent folder structure suggested and then deleted the original content from the htdocs folder. Once deleted, using rm -Rf folder_name, we used ln -s folder_location to create the shortcuts in the htdocs to the persistent equivalent directories.

persistent/sites/default/configuration.php
persistent/sites/default/images/
persistent/sites/default/plugins/
persistent/sites/default/templates/
persistent/sites/default/cache/
persistent/sites/default/administrator/
persistent/sites/default/components/
persistent/sites/default/includes/
persistent/sites/default/libraries/
persistent/sites/default/logs/
persistent/sites/default/media/
persistent/sites/default/modules/

The administrator panel should be refreshed and a fresh login should occur to ensure the changes are recognised, I needed to re-login to get the image upload function to work flawlessly.

Hope that is helpful to someone, certainly fixed our install!

*NOTE: we haven’t run this long enough to say for definite that it fixed ALL potential problems related to writing permissions.

Regards,

MATT