Last updated February 25, 2008. Created on March 3, 2005.
Edited by LeeHunter, dman, puregin, tlk. Log in to edit this page.

This describes an error which may occur with Drupal 4.5.2. The details for other versions may differ.

http://www.example.com/?q=admin/settings might yield error messages like this:

warning: mkdir(files): Permission denied in /data/www/public/includes/file.inc on line 77.
warning: mkdir(files/tmp): No such file or directory in /usr/data/www/public/includes/file.inc on line 77.

This means that Drupal needs write access to create (and later access) the files and files/tmp directories. One way to solve this is to give the webserver write access in the directory. Another common solution seems to be granting everybody write access to the "files" directory. Both solutions have the drawback that somebody else is able to write files into that directory. [if you know a better solution, please mention it here]

Solution 1 (recommended)
In the drupal root directory:
mkdir -p files/tmp
chown -R www files

Note: you may need to substitute www with the user id of your webserver process.

Solution 2
In the drupal root directory:
mkdir -p files/tmp
chmod -R 777 files

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.