2

I am trying to install Drupal 7 in a VirtualBox running Ubuntu, used Vagrant to set up the VirtualBox.

On the third step of the installation I got an error

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.

I have read and followed the instructions here

I already executed the commands below

chmod a+w sites/default/settings.php
chmod a+w sites/default

So as a last resort I created the sites/default/files directory manually

mkdir files
chmod 777 files

But I still get the same error message after changing the permissions on the folder

0

The execute bit is also needed on parent directories under which the directory in question is located. So depending on ownership, some combination of user/group/other permission masks must combine to grant the requesting user the execute bit for each parent directory. E.g. If sites/ and sites/default are group-owned by the user who executes PHP (call them www-data), then you must ensure both directories have the execute bit set for the group mask chmod g+x sites/ sites/default/. If www-data is neither an owner nor group owner of the parents, then the other mask must be set similarly: chmod o+x sites/ sites/default/.

1
  • So does this mean that I have to do chown on the directories? – lozadaOmr Jan 27 '14 at 1:43
0

This is should work in a dev environment. Not safe in production. In ubuntu, the username for the web server is www-data.

Go to the root directory of your website (where index.php is), and and run sudo chown -R yourusername:www-data ./ sudo chmod -R 770 ./ sudo chmod -R 775 sites/default/files

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.