2
votes

I am attempting to install Drupal 7.34 on RHEL and I continue to run into issues with permissions on sites/default/files. I've searched all over for a solution, but nothing has helped.

Here are the steps I am taking (with root access):

In /var/www/html I execute: drush dl drupal to download Drupal.

I then follow Drupal's install instructions (from /var/www/html):

mv drupal-7.34/* ./
mv drupal-7.34/.htaccess ./
mv drupal-7.34/.gitignore ./
cp sites/default/default.settings.php sites/default/settings.php
chmod a+w sites/default/settings.php
chmod a+w sites/default
cd ..
chown -R apache:apache html

In the browser, I navigate to http://myhost/install.php. In the "Verify requirements" step of the install process I receive the following error:

The directory sites/default/files does not exist.

So, I take then take the following steps:

mkdir html/sites/default/files
chmod a+w html/sites/default/files
chown apache:apache html/sites/default/files

When I attempt the install process I now get the following error:

The directory sites/default/files is not writable.

What am I missing here? The sites/default/files directory exists and is writable. Any guidance is much appreciated.

3
It is quite simple. Your "sites/default/files is not writable". change the permission ont sites/default/files to www-data - 2pha
from "www/default" execute "sudo chown www-data:www.data files" - 2pha
somthing like that. Itsthe da after xmas and Im drnk now :) - 2pha
try changing the permissions to 777 - balintpekker
Hi 2pha - thanks for the response. However, the user and group does not already exist www-data do not exist. Before I blindly add users could you briefly explain why I would do that? I will do my own Goolging, but if you could explain, that would be great. - j-schwartzy

3 Answers

1
votes

The solution I applied was more of a work-around, but I ended up using Drush to handle the entire installation rather than using it to download Drupal and manually configuring it from there.

1
votes

I still don't know the answer to this "simple" error but I do know that before adding users or granting full permissions to a group one must know the name of the user running (owning) httpd. This is not always www-data

Also - my sites/default/files -is- in fact writable as is the case for just about everyone who posts this question. There is something seriously wrong with Drupal's install that it has this issue, that it is so prevalent and not addressed adequately by the code maintainers. Searched about twenty responses to this "very simple" problem and still none of the suggestions work. Opened up permissions entirely, chown the drupal installation files to the httpd daemon (apache) and group (www in my case)

1
votes

These fixed it for me:

chmod 777 sites/default chmod 777 sites/default/setting.php

It turns out the 'chmod a+w...' commands in the docs were not enough - the 777 includes 'x', making the items executable as well as writable.