Configuring the temporary directory

Solutions

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

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.

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: Drupal 7 / Files

Similar questions

Drupal: Unable to create directory 'temporary://update-extraction/'
When I try to install a module on a drupal 7.37 version I get following message: In the Configuration->Media->File System I have the ./path/to/tmp folder with 777 permissions Any Idea?
Configure Drupal temporary directory outside of web root
I am trying to configure the temporary directory on my Drupal install. Previously, I have been on a cPanel shared account, and all I would simply do is add '../tmp' to the settings and it all worked fine. I have recently outgrown my shared account and upgraded to a VPS, with CentOS and VestaCP. Now, when I enter '../tmp' it says that the folder 'do...
What file and directory permissions do I need in my Features directory?
I just tried to generate a feature on my test system and Drupal complained that the web server didn't have write permission for the Features directory. I changed the permissions from the normal 750 & 640 for modules directories to 770 and 660 and it worked fine. I can't see any documentation that says you need to do this so I'm concerned someth...
Move all files and folders from a directory to another directory
I am unzipping some files and folders from an upload but the zip contains the files and folders one directory too deep. So currently they are located path-to-folder/anotherdirectory/ When I need them to be located at path-to-folder/ I have tried using the PHP rename function but get an error stating http 'wrapper does not support renaming in...' Do...
Vendor directory vs. Modules directory. What are the key differences?
I've seen articles that instruct developers to add docroot/vendor to the .gitignore but if I require a module with composer and push up that module, will that cause a huge error on the site I'm pushing up to? Does my composer.json file have to include all of the modules in my modules directory? If I were to copy and paste the composer.json file int...
Can we move a module from the directory "/modules" to the directory "/modules/contrib" without uninstalling it?
We have a Drupal 8 application which has modules directly in the directory "/modules" on the file system. I want to move a contributed module from the directory "/modules" to the directory "/modules/contrib". Do I need to uninstall the module before doing it? Are there any steps that need to be performed before and after moving the module?

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.