Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am unable to install drupal in my /var/www/html directory. When I tried to install, it says

File system 
The directory sites/default/files is not writable. 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.
    Unicode library PHP Mbstring Extension
    Settings file   The settings file does not exist.
The Drupal installer requires that you create a settings file as part of the installation process. Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php. More details about installing Drupal are available in INSTALL.txt.

I set 777 permission to directory drupal.And ls -l for directory default is [root@localhost default]# ls -l total 28

-rwxrwxrwx. 1 nitish root 23197 Mar 30 06:20 default.settings.php
drwxrwxrwx. 2 nitish root  4096 Mar 30 06:26 files
share|improve this question
up vote 1 down vote accepted

In general, please remember to include the specific command you are running. When you say "I am unable to install drupal" we have no way of knowing what you are doing and if you are doing it correctly.

So, what you are describing is a classic permissions issue. On Linux, you can only install things as root. If you are trying to install from source and you have already ran its configure script and compiled it using make, you should now run make install as root.

If you are following (as you should) Fedora's HOWTO and installing through yum, make sure you are running yum as root.

In any case, it is a VERY bad idea to have /var/www globally writeable (777). That opens a world of security problems.

Finally, as a general note, if you want to have read/write access to a directory called /foo/bar/baz, it is not enough to do chmod 777 /foo/bar/baz. That will give you access to the baz directory, but you still don't have access to /foo/bar so it will make no difference. It is kind of like unlocking the door to your bathroom but not the front door of the house, the bathroom is theoretically accessible but you can't get into the house so it makes no difference. What you need to do is change permissions for your target directory and every one above it. You can do this with the -R switch:

chmod -R 744 /foo/

This will set the permissions for /foo and all its subdirectories. However, I repeat, do not do this for the /var/www directory, it is a serious security risk.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .