Drupal: "The directory is not writable"

I recently upgraded my Drupal core from 6.15 to 6.26. During the upgrade process, I was asked to backup all my files, and then remove the entire Drupal installation from my server and rebuild it using the attached files. Then I copied all the relevant backup files back to the server from my local machine. The problem that I am facing right now is that I get a "Directory is not being written" notification when I do any actions as an administrator. I initially got the error that "sites / default / files" was not writable, but I fixed it and I changed the permissions for each file in the installation to 755. Why am I getting this error and how can I fix it?

+3
source share
5 answers

Although permissions can be set to 755, most likely the wrong user has been set for the directory owner.

+5
source

Just wanted to add this feature that fixed this problem for me after many attempts:

If you use SELinux (for example, Fedora), you may experience a "security context" problem on / sites / default or / sites / default / files. Therefore, even if you open it with chmod 777 (not a good idea), you will get STILL permission.

fix (first cd to sites directory):

restorecon -rv default/

I ran it locally as root.

I do not pretend to be an expert in security contexts by any stretch, but the Fedora documentation is here .

, !

+3

After finding a permission problem, you probably want to go back and chmod 644 for all files, and 755 for directories (besides the download folder) just to be safe.

0
source

You can do this using two possible options:
1. change the owner of the file directory and all files inside it to the apache user

2. Give 777 permissions recursively to the file directory

0
source

Drupal sometimes creates some directories, so check to see if the subcategories of the sites / defaults / files have permissions.

0
source

All Articles