Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As in the title, when updating to the latest version Drupal gives this error and aborts: Unable to create directory 'temporary://update-extraction/google_analytics/'
Comments
Comment #1
hass CreditAttribution: hass commentedWhat version have you upgraded from? Verify if your temp folder is correctly configured, permissions and writable, etc.
Comment #2
hass CreditAttribution: hass commentedHave read the title again. Sounds like a core issue if this is not a bug in your config what I expect.
Comment #3
dbeall CreditAttribution: dbeall commentedI was having a similar error at module upgrade and solved it
My install is in a sub directory..
I had to change the tmp path in drupal to the FULL path as follows
/home/account-name/public_html/drupal7/tmp
edit:
thinkin back, my error did not occur in d7rc2 when i first ran the auto-update module
-and-
I did try many different ways as far as directory permissions before messing with path.. no change
Comment #4
wickedskaman CreditAttribution: wickedskaman commentedCool... thanks for weighing in. I will give it a try after we go live and report back yay or nay after we are no longer in the sub directory. Seems like this should be handled... small bug in core.
Comment #5
hass CreditAttribution: hass commentedMy dev is also in a subdir and i have never seen this myself, but update module have many bugs... It's possible...
Comment #6
dww#1008328: Uniqueify update-cache and update-extraction directories to prevent "Permission denied" errors
Comment #7
srbobc CreditAttribution: srbobc commentedMy Drupal 7 installation is in a subdirectory so I fixed this logging in and navigating to: Configuration:File System and changing the Temporary Directory to read:
/home/my_account_name/public_html/sub_directory_name/tmp
Voila!
Comment #8
ecommercium CreditAttribution: ecommercium commentedHad this error on the 7.0 release and fixed this by setting File System Temporary directory to username/tmp (a dir tmp in my hostings root dir where i user have permissions writing) Cheers
Comment #9
mindful CreditAttribution: mindful commentedThanks to all above for the posts. I too was having the issue with installing themes into a subdirectory D7 site.
Based on your posts and some additional investigation, here is what I found and the SOLUTION that worked for me.
SOLUTION
The default install for D7 assumes:
WHAT I LEARNED
SUGGESTION
There appear to be 2 files involved under yor site root
If the update-... was optionally appended with the HTTP_HOST/ as:
(syntax and location may need to be adjusted) but this would force a unique Temporary path for each domain using a D7 instance.
Spent a few days researching this and found many posts that seemed to state solutions but did not provide the specifics so I hope this summary helps others with the same issue.
Comment #10
wickedskaman CreditAttribution: wickedskaman commentedThis is what worked for me.
Went into admin/config/media/file-system
and changed the temporary directory from /tmp to tmp
Removing the first slash seemed to fix it.
This has been the case on GoDaddy, Blue Host, and various flavors of CPanel hosts.
Comment #11
tomcatuk CreditAttribution: tomcatuk commented@wickedskaman confirmed this is the fix for GD hosting - thanks!
Comment #12
wickedskaman CreditAttribution: wickedskaman commented@tomcatuk: no sweat! Glad to be somewhat useful! :)
Comment #13
Dries ArnoldsThe web root autodetection was the problem on my installs. Drupal detected:
/home/vhosts/site.com/tmp
but the root was actually:
/usr/home/vhosts/site.com/tmp
Works like a charm now.
Comment #14
dtoulkidis CreditAttribution: dtoulkidis commented(Installation info: Greece. webhost:www.papaki.gr. It offered a "one click installation" of drupal.)
1. Go in D7 Admin interface > Configuration > Media > File System > Temporary Directory
it defaults to "/tmp" ( at least mine did).
2. As I saw on the top of the page the public file system path defaults to "sites/default/files" with no "/" at the beginning, which made me realize that "/tmp" should just be "tmp" ... :) changed it. And it works!
3. But since the instructions underneath clearly says “This directory should not be accessible over the web.” what we are searching for is the tmp folder outside the domain's “public_html” or “httpdocs” folder.
So I changed it again to “../../tmp” (my_domain/tmp in reality)
Works like a clock!
Hope I helped.
Comment #15
dibyadel CreditAttribution: dibyadel commentedit worked for me. I changed the tmp path from /tmp to tmp
Comment #16
raxxraxx CreditAttribution: raxxraxx commentedI think there might be a bug in here.
I had created the temporary path within my Drupal install folder and referred to it with an absolute path as /directory/to/drupal/install/newtmpfolder/ . I made sure newtmpfolder was chown'd properly (by su'ing to the apache user and making files and folders in the temp folder) and that I had typed the absolute path properly (by cutting and pasting the path into a cd command) and both were set correctly.
Then I changed to using the relative path 'newtmpfolder/' and it worked.