When I run cron on my new drupal 7.0 installation I get this warning message
Warning: unlink(/var/tmp/update-cache/danland-7.x-1.0.tar.gz) [function.unlink]: Permission denied in drupal_unlink() (line 2139 of /home2/lufttabl/public_html/huronumc.org/includes/file.inc).
using ssh I investigate the file and discovered that I wasn't the owner, which was not surprising as I have never used danland on this server.
I emailed my host for support, and requested a way to clear the temp directory and got this reply:
The /var/tmp/ directory is shared between all users on the server. Generally this isn't a problem as most programs generate a random name for the files they store there. In this particular case, the file name is colliding with what another user has already stored there. Potential fixes:
1. Work with the creator(s) of the script to ensure that the filename will be unique within /var/tmp/.
2. Configure the script (assuming it supports this option) to use the tmp/ directory in your home directory instead of /var/tmp/.Checking across that directory, it does appear that session files are cleared out after 7 days, but other files may stay longer.
So, for now I'm wondering if there is a way to change the tmp directory (there isn't that I know of without hacking core). Also, this bug will probably crop up more in the future as more people switch to Drupal 7, and find conflicts with another user on their shared host.
-Josh
Comments
Comment #1
Tor Arne Thune commentedWhat you are looking for can be found at: Administration » Configuration » Media » File system. Fill in the field "Temporary directory".
There is currently an issue trying to solve this and make the temporary file directories (update-cache and update-extraction) carry an unique string. See #1008328: Uniqueify update-cache and update-extraction directories to prevent "Permission denied" errors. I think your issue is a perfect example that this patch is needed, and that unique strings is the way to go.
Marking as duplicate.
Comment #2
JoshOrndorff commentedThanks for pointing me to the setting. It was right in front of my face.
And sorry about the duplicate issue. I really did search first. I'm glad it's being addressed though.
-Josh