I am trying to install a ready-made instructional site on my local Linux webserver. How should I proceed?

Thank you J.Reynolds for answer.

Please understand that after I posted question I did some homework and read the article you mention, that is why I am editing question.

mod-rewrite is enabled and so is AllowOverride, the site is correctly chowned and I opened the perms to 777 to get it going, I will correct that later.

I imported the db and edited settings.php to "glue" files and db, basically I replicated the settings of another settings.php file from a site that I created from scratch and virtualized same as this one, the differences are only the site customizations of course.

I entered correct $base_url.

The site is still failing and here is the error message:

"The specified file temporary://fileK7hduG could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log."

This message keeps repeating for 6 times with different temp files. I looked at the apache2 log and there is nothing useful there.
I cannot figure out how to launch this site correctly.


You need to tell Drupal where the database is that you imported.

  1. Make sure to copy default.settings.php in sites/default to settings.php (if it does not already exist, in which case you can skip this step.).

  2. Edit $databases array (lines 213 or so) in setttings.php. You should add the username and password of a user with full privileges on your MySQL installation (usually it will be user root, with password root).

For instance:

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'NAME OF DATABASE YOU IMPORTED',
      'username' => 'USERNAME',
      'password' => 'PASSWORD',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',

You should now browse to admin/reports/status which, will give you instructions to change file permissions for settings.php so that it is not publicly writable, and maybe to run Cron or Drupal updates.

Please also look at Migrating a site for more in-depth instructions.

Chances are that the default root username and password for your MySQL instance would be: root, and root. If it is not, then please open PHPMyAdmin and have a look at the User tab section/or google for assistance on how to create a new user with 'ALL Privileges'.


The above piece by J. Reynolds is of course correct and I had to check all those steps.
Migrating a site created by another user in a completely different environment than my Linux Apache webserver will have settings that will crash the site and are difficult to find.
In my case the error was caused by permissions on /sites/default/files folder.
I chmoded recursively the whole site to 777 just to troubleshoot the perms issue but it was still there.
A second look to the perms in the mentioned folder showed that they were not 777 like the rest of the site, the folder was 555 write-protected, why?
This folder holds a .htaccess file which does not allow a user without elevated privileges to change the perms, I chmoded as my user because drush does not like to be ran as root.
In this case I had to become root to chmod 775 recursively the folder, which fixes the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.