Web based module update in Drupal 7 on Dreamhost

1 minutters læsning

I created a site for a friend with Drupal 7. I did it as a friendly gesture because they urgently needed a new site. So I probably used 3 hours setting up the site.

First, I created a drush make file and an install profile in version control and I logged into my Dreamhost server using ssh. I could easily clone the install profile to a directory via:

git clone git://github.com/hampen/hampenhallen-deploy.git<span style="display: none;"> </span>Second, And then I navigated to the folder to setup the actual site:

<div class="codeblock"><code>drush make hampenhallen_dk.build ../hampenhallen.dk</code></div>Now drush automatically pulls all the dependencies for the site. Then I needed to do the ususal Drupal setup stuff:

<div class="codeblock"><code>cp sites/larsolesen.dk/default.settings.php sites/larsolesen.dk/settings.php<br></br>chmod 777 sites/larsolesen.dk/settings.php<br></br>mkdir sites/larsolesen.dk/files<br></br>chmod 777 sites/larsolesen.dk/files</code></div>I just choose an open source theme and created the users, and now my fried was basically ready to start building his own site using Drupal 7.

What about upgrading modules?

Normally I would just use drush to upgrade the modules. However, my friend is not familar with Drupal and drush, so he needed to be able to do it via the web interface. However, on Dreamhost the default settings do not work, as writing to the temporary folder fails because of permission issues.

The reason being that the temporary directory is set to:

<span style="display: none;"> </span>/tmp<span style="display: none;"> </span>

Being on a shared server environment my user does not have access to that folder. So I created an new folder beneath my user and gave the user write permissions.

<span style="display: none;"> </span>cd ~
mkdir tmp
chmod 644 tmp<span style="display: none;"> </span>

Now I just had to tell Drupal about it, and I navigated to Configuration –> File system. There I could change the setting to the directory I have created, like shown in this screenshot.

Thats about it for having automatic upgrades for modules on Drupal 7 on a shared Dreamhost server.

Kommentarer

Angus

Thanks for this. I ran into this for the first time last night and hadn’t a clue where to start debugging it. Problem solved

Angus

I ran into a permissions problem with the tmp file. I took the shotgun approach and switched it to 777 to make it go away but that makes me antsy. I didn’t have time to play today but I think it should be 755.

Skriv en kommentar

Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret *

Indlæser...