[FORWARDPORT 2.3] Removed cache backend option which explicitly set file permissions #14416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#14361
Description
This fix will allow the Magento Framework to no longer explicitly set file/directory permissions from the default cache backend by removing use of the hashed_directory_umask option
'hashed_directory_umask' => 0777,
from code within the file
lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php
.This option was deprecated and removed from the Zend Framework as of version 1.12, but has remained in the Magento Framework.
Cm_Cache_Backend_File class still supports "hashed_directory_umask" option, with additional class code providing backwards compatibility with ZF 1.11.
However, setting this option was causing Cm_Cache_Backend_File to use PHP's chmod function recursively on the hashed directory structure during file and directory creation. Simply removing this option allows permissions to be inherited properly from the file system, and respects SETGID bit and Magento umask.
Fixed Issues (if relevant)
Manual testing scenarios
var/cache
andvar/page_cache
and upContribution checklist