d7 temporary directory & cpanel
Drupal 7. It looks like the file setting in Configuration > File System, Temporary directory might be the cause of error messages /problems. I didn't write down the initial errors.
Funny thing is that I have a lot of D6 sites on the same server, with the same standard setting as D7 and there have not been any problems with it.
The issue might also be related to a multisite setup, with multiple sites using the same tmp directory.
-------
Update 110811: Also see:
http://stackoverflow.com/questions/5040718/file-system-permission-error-...
http://drupal.org/node/1106492#comment-4562780 (how to fix it)
http://drupal.org/node/1008328 (D7 patch/update = fixed in new versions)
-------
At the actual file manager home/username level, above public_html, there already is a tmp directory, but it is clearly used for cpanel data. I suspect that Drupal's temporary files really should not go in there. So:
Temporary directory standard setting is
/tmpThe D7 entry box has a warning that the tmp directory should not be accessible through the web.
For Acquia "cloud" hosting the setting is suggested as
mnt/files/[sitename]/files/tmpSource: http://network.acquia.com/documentation/acquia-hosting/drupal-temp-dir
I suspect that a unix type mnt would not be applicable when using standard shared hosting.
Some forums say the setting should better be
/home/[username]/tmpand set permissions chmod 777.
Source: http://rockthedrop.com/drupal_help/just-installed-drupal-7-and-getting-m...
This still creates a directory/file path within public_html: home > name > tmp, instead of moving up a level above public_html. And 777 looks wrong to me.
Then some suggestions are
home/[username]/tmpSame as above, but no slash.
Source: http://drupal.org/node/1008776
Then, any tmp folder in the user directory
tmpwith "proper" access permissions.
Source:
http://stackoverflow.com/questions/3134736/drupal-php-problem-with-hosti...
http://drupal.be/forum/tmp-problemen-bij-nederlands
Some forums say the setting should be in
sites/[sitename]/files/tmpSources:
http://stackoverflow.com/questions/4632779/drupal-7-is-unable-to-install...
http://network.acquia.com/node/1390520 (on windows server, search for "temp")
This separates the tmp directories for multiple sites and dbases using one code base; solving the issue of temporary files for multiple sites getting mixed up. But it looks fairly unsafe.
Following this,
- sites/[sitename]/files/tmp directory creates itself there with permissions 755
- sites/[sitename]/tmp will not create itself (permission denied).This would need to be done manually
That seems ok. But probably better to still to use option 2.
Source: http://old.nabble.com/problem-with-tmp-folder-and-permission-td23434921.... (last).
My experimenting with this may have caused problems with the sites.
Not sure how to handle this yet.
Most probably unrelated, the entire hosting account crashed. Since the sites were new, I reinstalled them (in D6). This issue will reappear lateron, and I keep looking for a definitive solution.
Comments
Post new comment