Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am facing a problem while installing drupal on my Linux (Fedora 15) machine.

I have downloaded the drupal package from drupal.org website and copied the package to my web directory /var/www/html/DP There I have extracted the package and renamed the extracted folder to drupal.

Now I have created the database dbdrupal in mysql database.

I have copied the ./sites/default/default.settings.php to ./sites/default/settings.php

Now when I go to my web browser and open the link http://localhost/DP/drupal/install.php installation started but at 3rd stage ( Verify Requirements ) - it shows error

  1. File system

    The directory sites/default/files does not exist. An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the online handbook.

  2. Settings file

    The settings file is not writable.

    The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process. If you are unsure how to grant file permissions, consult the online handbook.

    I have created a folder /sites/default/files and gave it full permission 777 also gave full permission 777 to sites/default/settings.php, but I am still getting the same error.

share|improve this question
add comment

4 Answers 4

I guess you copied the drupal install to your /var/www/html/DP directory using your root user. You will have to change the ownership of this directory and everything below it to the apache user. I think fedora runs httpd as apache so as root

cd /var/www/html
chown -R apache:apache DP

You should set the permissions on the files you changed back to their original settings too.

share|improve this answer
    
Thanks bro for your kind answer. I have already do this but still I got the same error. –  Untraceable Dec 23 '11 at 6:36
add comment
up vote 1 down vote accepted

Thanks to every one who try to help me to come out from above problem.

I resolved this problem as follows:

  1. login my fedora as root user in graphical mode

  2. go to /var/www/html/DP/drupal/sites/default

  3. Right click on file folder

  4. go to properties -> permissions.

  5. set SELinux Context to - httpd_user_rw_content_t

After doing this every thing is working fine. I done this from graphical mode as I don't how to do it from terminal.

share|improve this answer
add comment

You can also set SELinux Context Apache via

chcon -t execmem_exec_t '/usr/sbin/httpd'
share|improve this answer
add comment

provide the permissions to the settings.php like sudo chmod -R 777 sites/defualt/settings.php

and if u are creating multisite create the files folder and grant it permissions

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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