PHP Guidelines (open_basedir and upload_tmp_dir) - Server Configuration - Early Baldness
1-
From the file /etc/php/7.3/fpm/php.ini I disable both directives:
open_basedir and upload_tmp_dir
2-
I add (I try to add) both directives directly to the VirtualHost file.
I get there for open_basedir but not for upload_tmp_dir
SetEnv PHP_ADMIN_VALUE "open_basedir=/var/www/visionduweb.fr/:/tmp/"
I am not sure to understand what value to put in this link for tmp. Is :/tmp/ the "upload_tmp_dir" folder ?
3-
In the Joomla Administration, Joomla configuration, I set the Joomla tmp folder to point to a "joomla_tmp" folder that exists on the server. ( sudo mv /tmp /joomla_tmp )
4-
I also create a new tmp folder on the server, which should be the one used by "upload_tmp_dir"
sudo mkdir tmp
I put www-data: www-data for owner and group.
I put chmod 4706 tmp / to get a "non-world-readable directory" but I do not know if it's ok ?
Joomla should not display a folder alert upload_tmp_dir not defined since Extensions / Warnings.
phpinfo () and phpsecinfo () should consider that open_basedir AND upload_tmp_dir are correctly defined.
WONDERFUL!
Joomla no longer displays an alert for the undefined upload_tmp_dir folder from Extensions / Warnings.
The problem:
infophp () and phpsecinfo, they say that upload_tmp_dir is not defined! This is obviously the case because I did not know how to define upload_tmp_dir from the VirtualHost and that upload_tmp_dir is disabled since the global configuration of /etc/php/7.3/fpm/php.ini
Joomla will see that a folder joomla_tmp exists and a file tmp exists, but, do not understand that the directive, it is not defined! It's really strange !
I appeal to the community to help me understand if I can redefine the value of upload_tmp_dir from the VirtualHost, with command of the type, but, for upload_tmp_dir :
SetEnv PHP_ADMIN_VALUE "open_basedir=/var/www/visionduweb.fr/:/tmp/"
I do not speak of .htaccess or php.ini from the website, only with the VirtualHost.
I am looking to be able to validate the two directives on infophp and phpsecinfo before going to read if Joomla is satisfied in Extensions / Warnings
I'm also trying to understand what is expected by upload_tmp_dir when we talk about " non-world-readable directory "
Debian Buster OVH VPS.
My notes in French to try to configure the VirtualHost with open_basedir and upload_tmp_dir :
The PhpSecInfo project : https://github.com/ZerooCool/phpsecinfo
Labels |
Added:
?
|
Labels |
Added:
J3 Issue
|
Status | New | ⇒ | Discussion |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-12-30 01:34:31 |
Closed_By | ⇒ | Quy |
Please ask help in Joomla Forum. https://forum.joomla.org/