Drupal - Configuring the temporary directory

Check Administrator -> Configuration -> Media -> File System to personalize your tmp path. Make sure to use relative paths and have the right privileges for the Apache user.

I personally like this article fix file upload. He has good observations. It worked for me.

Recently, I downloaded my site to my Mac computer. It happens that in my Mac I was using mod_userdir for Apache and I forgot that in /etc/apache2/users/nameofuser.conf I need to set AllowOverride All, otherwise I will have the following message:

The specified file temporary could not be copied because the destination directory is not properly configured.


In your settings.php for older versions of Drupal add:

$conf['file_temporary_path'] = '/tmp';

Or for newer versions of Drupal add:

$settings['file_temp_path'] = '/tmp';

This will work on unix systems 99% of the time.

Usually the /tmp directory exists on UNIX systems with open permissions, and it exists specifically for temporary files and is often set up to improve performance.

You can check permissions by running ls -al /tmp on the command line.

If you're interested in further reading on this, see https://en.wikipedia.org/wiki/Temporary_folder


It's important to understand that a permissions problem can exist in BOTH your specified temporary directory (which is defined at admin/config/media/file-system) AND at the folder where that temporary file is going to be copied. I've seen this error a few times and it's usually not an issue with the temporary folder, but the final folder where that file is copied after living in the temp folder.

Also ensure that the public file system path is set correctly.

Tags:

Files

7