?
avatar waveywhite
waveywhite
31 Jan 2018

Steps to reproduce the issue

PHP / Apache configuration - sys_temp_dir set to /tmp, upload_tmp_dir set to siteroot/tmp
Joomla configuration - tmp folder set to siteroot/tmp
Install a package via uploading in extension manager

Expected result

Package should install

Actual result

Fails with error Unable to find install package.
Log shows:

[Wed Jan 31 17:21:26.540380 2018] [:error] [pid 27404] [client [...]:30474] /tmp, referer: [...]/index.php?option=com_installer&view=install
[Wed Jan 31 17:21:26.540572 2018] [:error] [pid 27404] [client [...]:30474] PHP Warning:  realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/share/pear:/var/www/[...]) in /var/www/[...]/httpdocs/libraries/vendor/joomla/archive/src/Archive.php on line 55, referer: [...]/administrator/index.php?option=com_installer&view=install
[Wed Jan 31 17:21:26.543517 2018] [:error] [pid 27404] [client [...]:30474] PHP Warning:  file_exists(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/share/pear:/var/www/[...]) in /var/www/[...]/httpdocs/libraries/vendor/joomla/filesystem/src/File.php on line 193, referer: [...]/index.php?option=com_installer&view=install
[Wed Jan 31 17:21:26.544592 2018] [:error] [pid 27404] [client [...]:30474] PHP Warning:  is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/share/pear:/var/www/[...]) in /var/www/[...]/httpdocs/libraries/vendor/joomla/filesystem/src/Folder.php on line 129, referer: [...]/administrator/index.php?option=com_installer&view=install

System information (as much as possible)

PHP 5.5.9, Apache2, Ubuntu 16.04

Additional comments

Seems to be related to libraries/vendor/joomla/archive/Archive.php line 55 using sys_get_temp_dir rather than the site configuration temp folder:

isset($options['tmp_path']) or $options['tmp_path'] = realpath(sys_get_temp_dir());

Work-around is to set sys_temp_dir to /tmp, either in root php configuration or override in apache virtual host configuration file using php_admin_value sys_temp_dir siteroot/tmp

avatar waveywhite waveywhite - open - 31 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jan 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Jan 2018
avatar waveywhite waveywhite - change - 31 Jan 2018
The description was changed
avatar waveywhite waveywhite - edited - 31 Jan 2018
avatar waveywhite waveywhite - change - 31 Jan 2018
The description was changed
avatar waveywhite waveywhite - edited - 31 Jan 2018
avatar waveywhite waveywhite - change - 31 Jan 2018
The description was changed
avatar waveywhite waveywhite - edited - 31 Jan 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Jan 2018
Category com_plugins
avatar zero-24 zero-24 - change - 8 Feb 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-02-08 02:23:23
Closed_By zero-24
avatar zero-24
zero-24 - comment - 8 Feb 2018

@waveywhite please have a look into my pull request and test it so we can include it in the main branch: #19608

As there is a Pull request i'm going to close this issue here. Please test #19608

avatar zero-24 zero-24 - close - 8 Feb 2018

Add a Comment

Login with GitHub to post a comment