0

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.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251
Untraceable
  • 176
  • 1
  • 5

4 Answers4

2

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.

user9517
  • 115,471
  • 20
  • 215
  • 297
2

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.

Untraceable
  • 176
  • 1
  • 5
0

You can also set SELinux Context Apache via

chcon -t execmem_exec_t '/usr/sbin/httpd'
Switch
  • 159
  • 10
-1

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