Ticket #923 (closed defect: fixed)

Opened 5 months ago

Last modified 2 hours ago

Open basedir errors with filemanager. Anyone else has the same error?

Reported by: Zothos Assigned to: kilburn
Priority: major Milestone: ispCP ω 1.0.0 - RC5
Component: Backend (Engine) Version: ispCP ω 1.0.0 - RC2
Severity: Hard Keywords:
Cc:

Description (Last modified by joximu)

Warning: ftp_rawlist() [function.ftp-rawlist]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /var/www/ispcp/gui/tools/filemanager/includes/browse.inc.php on line 123
''''''
Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /var/www/ispcp/gui/tools/filemanager/includes/browse.inc.php on line 123
''''''
Warning: ftp_rawlist() [function.ftp-rawlist]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /var/www/ispcp/gui/tools/filemanager/includes/browse.inc.php on line 124
''''''
Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /var/www/ispcp/gui/tools/filemanager/includes/browse.inc.php on line 124

Attachments

Change History

12/10/2007 03:36:40 PM changed by joximu

  • description changed.

12/10/2007 03:51:44 PM changed by rats

  • status changed from new to closed.
  • resolution set to invalid.

old PHP-Version, please upgrade!

12/10/2007 05:22:25 PM changed by Zothos

hm, standard etch....

12/11/2007 12:43:33 AM changed by rats

php -v

says?

12/11/2007 09:23:58 AM changed by Zothos

Now i have updated my php with the dotdeb packages. But still some errors. Trying to evaluate the error.

05/03/2008 12:09:29 AM changed by ispcomm

  • status changed from closed to reopened.
  • resolution deleted.

The problem is still present in r1132. This is php5+fastcgi on etch (php5.2.0).

As this is what etch supplies (and will be around for few years to come) I think it's better to make it work with this version of PHP5 instead of forcing users to update to newer version(s) from unofficial repositories.

I'd fix the htaccess/ftp directory browser to use either the temp php dir or to give access to /tmp to the administrative domain (only).

05/03/2008 04:33:16 PM changed by zothos

  • severity set to Hard.
  • milestone changed from ispCP ω 1.0.0 - RC4 to ispCP ω 1.0.0.

05/15/2008 06:53:41 PM changed by uezdiy

05/15/2008 07:52:18 PM changed by kilburn

  • owner set to kilburn.
  • status changed from reopened to new.

Are you using mod_php or the fastcgi version? There's this piece of code in the vfs.php to avoid the same error when it was found on the control panel:

if (!defined("VFS_TMP_DIR")) {
    define("VFS_TMP_DIR", $cfg['GUI_ROOT_DIR'] . '/phptmp');
}
$_ENV['PHP_TMPDIR'] = VFS_TMP_DIR;
putenv("PHP_TMPDIR=" . $_ENV['PHP_TMPDIR']);

Adapting it to the filemanager I would suggest adding this to the file "/var/www/ispcp/gui/tools/filemanager/settings.inc.php":

// ----------------------------------------------------------------------------------
// TEMP DIR OVERRIDING
// ----------------------------------------------------------------------------------
$tmpdir = realpath(basedir(__FILE__) . '../../phptmp');
$_ENV['PHP_TMPDIR'] = $tmpdir;
putenv("PHP_TMPDIR=" . $tmpdir);

Can you test it?

05/16/2008 11:02:25 AM changed by rats

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from ispCP ω 1.0.0 to ispCP ω 1.0.0 - RC5.

added in r1157


Add/Change #923 (Open basedir errors with filemanager. Anyone else has the same error?)




Action