Bug #70869
closedInstall tool/ Configuration presets/ Image handling settings => findGraphicsMagickInPaths fails with openBasedir
100%
Description
I'm not sure if this is really a bug or just a wrong system configuration:
In /typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php / function findGraphicsMagickInPaths is a check if gm exists:
if (@is_file($path . $executable)) {
As /usr/bin is not (and IMHO should not be) in the openBasedir definition, the (existing) file /usr/bin/gm is not found - at least I think, that is the reason.
The consequence: In the install tool I can't choice the "Graphics Magick" option.
But if I comment out the above condition I can choice the option - and it works without a problem.
That means that not finding an executable file with php is_file function in the web server context doesn't imply that the file is not executable with php.
Same with ImageMagick6Preset.php and with TYPO3 6.2.
Updated by Alexander Opitz almost 7 years ago
The issue still exists.
And yes, the issue is the openBasedir restriction.
The same issue happens inside CommandUtility which tries to check the available paths to run commands, so it can happen that services fail but do exists.
HINT: If a service fail as executable isn't found, use the "[SYS][binSetup]" to setting it hardly in your configuration, then the check won't happen.
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79892
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79892
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79892
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79865
Updated by Susanne Moog over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e97960ffe7d4764eccd1f5c51ca63def62869214.
Updated by Georg Ringer over 1 year ago
- Related to Bug #101349: Configuration Presets added
Updated by Stefano Danieli 10 months ago
- TYPO3 Version changed from 7 to 12
Hi : the problem persist.
PHP Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/bin/gm) is not within the allowed path(s):
GraphicsMagickPreset.php line 78
The error is located in
if (!file_exists($binaryPath) || !is_executable($binaryPath)) {
continue;
}