Bug 250518 - Installation fails because of missing access to /tmp on shared webhosting
Summary: Installation fails because of missing access to /tmp on shared webhosting
Status: RESOLVED NOT A BUG
Alias: None
Product: owncloud
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Frank Karlitschek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 04:43 UTC by lhugsereg
Modified: 2011-06-17 13:47 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lhugsereg 2010-09-08 04:43:08 UTC
Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

I installed ownCloud from git on a shared LAMP hosting and opened it to do the first run setup (as described in the wiki).

After having entered all the necessary details into the first run form (choosing a MySQL DB) and hitting "Save", I get the following error messages. The next time I open the owncloud website I get once again an empty first run form.

Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/:/usr/share/php/:/server/db-admin/src/:/server/db-admin/etc/phpmyadmin/config/:/tmp/php-uploads/) in [HTMLROOT- privacy, you know ;)]/owncloud/inc/lib_base.php on line 588

Warning: unlink() [function.unlink]: Unable to access in [HTMLROOT]/owncloud/inc/lib_base.php on line 593
MDB2_Schema Error: schema parse error: Parser error: File could not be opened. - Unknown

Shouldn't be to difficult too fix but I don't speak PHP ;)

Reproducible: Always
Comment 1 Oluf Lorenzen 2010-09-08 09:02:05 UTC
The problem is, that PHP wants to save temporary data to /tmp, which is not allowed (/tmp is not in on of the folders given).

You should ask your hoster to change the php-temp-directory to something like /tmp/php-uploads and perhaps add a link to this bugreport ;).
Comment 2 Robin Appelman 2010-09-08 12:43:32 UTC
There are quite some places where ownCloud will (try to) use /tmp to store temporary files.
A way to work around it might be for owncloud to check if there is a folder in /tmp which is in the allowed paths (/tmp/php-uploads in this case) and store it's files there instead.
Comment 3 Oluf Lorenzen 2010-09-08 13:15:02 UTC
@Robin:
the script does not use /tmp hardcoded but uses the value from the php-config, as far as i understood the sys_get_temp_dir funktion.
Trying to guess such values from the allowed paths will possibly make things worse ;)
Comment 4 Robin Appelman 2010-09-08 13:51:20 UTC
But if we can get the list of the allowed paths, we can check if one of those is a subfolder of the folder that sys_get_temp_dir returns.
If that is the case, we can probably use that folder for temporary storage
Comment 5 Oluf Lorenzen 2010-09-14 11:43:20 UTC
(In reply to comment #4)
> But if we can get the list of the allowed paths, we can check if one of those
> is a subfolder of the folder that sys_get_temp_dir returns.
> If that is the case, we can probably use that folder for temporary storage
Uh? IMO that does not really make sense.
When sys_get_temp_dir returns an folder that is not writable that is an error which should not happen on a normal php-configuration.

This has to be fixed by the hoster, not some wired workaround-assumptions.
Comment 6 lhugsereg 2010-09-14 12:10:55 UTC
Thanks :) I'll talk to my hoster!
Comment 7 François KUBLER 2010-11-22 15:50:06 UTC
Well, at least, I think the installer should display a nice message instead of going on. (This bug can be closed, can't it ?)