How to fix Drupal error “the directory sites/default/files does not exist” for HostGator Drupal sites.

If you run the Drupal status report and see the following error:

The directory sites/default/files does not exist

It means the directory in your HostGator (or other hosting) does not have the correct permissions to allow Drupal to allow access to the files.

First check your status report to see if you have this error:

If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions. Rebuild permissions

If this is not fixed before you install modules you will run into trouble.

I have seen this more than once on new Drupal sites with HostGator, not sure why.

Here is what I did to fix:

Got on chat with HostGator by logging into cPanel and clicking the chat icon:

There is a script that support can run on the server internally to set the permissions to the default settings – ask them to run the script.

Or you can manually edit permissions in file manager using this hostgator link:

https://support.hostgator.com/articles/cpanel/how-to-change-permissions-chmod-of-a-file

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply