I've just made a fresh install of this RC3 and got into this issue

"Permission denied" errors deleting /tmp/update-cache/* files when running cron

After i fixed the problem in the way I explained, I thought that IMHO there is a problem in the way the update module handles the installation and updates of modules through Drupal's web interface.
If I try to install a module giving Drupal the url to its tarball I've seen that Drupal downloads it to a directory named update-cache and then extracts it to update-extraction
This becames a problem on a shared host, as by default the temporary directory in Drupal file system settings is set to /tmp/ that is common for the users of the same shared host machine. This way we can have a problem of concurrency because different users will try to write directories and files with the same names!

I think that maybe a random string could be added to the name of directories on their first creation (to make them unique in a way to that user and that drupal installation).
Or otherwise the temporary directory should not be set by default, during Drupal installation, with a disclaimer pointing out the problems that setting it to "/tmp" could cause on a shared host machine

GP

CommentFileSizeAuthor
#4 drupal7-install-1009028.png58.11 KBlee20

Comments

gp.mazzola’s picture

As a proof of my previous doubt, I have just tried to install a new module through web interface, leaving the default setting for the tmp folder to /tmp/ where there is already an update-cache folder owned by another user of the same machine. The output is:

I think it's a major problem if we want to say that Drupal works on shared host

Moreover it's a problem from a more general point of view: even in the best case of a single user on a machine, for what you know, there could be another application trying to write a directory with the same name in the tmp directory. So "update-cache" it's not a safe name/choice. Always IMHO :)

dww’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Uhh. If you're on a shared host, don't use /tmp as your temp directory. You want something site-specific. /path/to/your/home/dir/tmp/[site-name] would be a good choice. IMHO, if you're writing into /tmp on shared hosting, you get what you deserve.

gp.mazzola’s picture

Hi, thank you for the answer.
I don't agree that should be the user choosing a unique safe name in a temporary folder, but it should be business of the application.
However, accepting your point of view and that this is the designed behavior, if you read my post, this point remains:
when you install D7, it sets by default the temporary directory to /tmp/ without asking anything to the user.
And this most likely leads to the reported errors. With no user fault, as it was not his choice, neither he was informed.

bye,
gp

lee20’s picture

Version: 7.0-rc3 » 7.0
StatusFileSize
new58.11 KB

Just installed 7.0 and got these errors. Don't have anything new to add but attached is a screenshot of the errors that were given.

gp.mazzola’s picture

Category: support » bug
Status: Closed (works as designed) » Closed (duplicate)