Bug #71328
closedFile Abstraction Layer: Update storage index fails when it encounters unreadable directories (e.g., .git)
100%
Description
We have an installation of 6.2.14 with very strict security policies.
It was impossible to get FAL's scheduler tasks up and running without patching the core:
The execution of task "File Abstraction Layer: Update storage index (scheduler)" failed with the following message: RecursiveDirectoryIterator::__construct(/installationpath/fileadmin/user_upload/.git/logs): failed to open dir: Permission denied
This makes adding file outside of the backend hard.
We have inmplemented a working soultion that is suitable for the TYPO3 core.
The RecursiveIteratorIterator can be called with a second flag, making it ignore unreadable directories:
Two occurrences can be replaced without breaking :
1.
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php:472
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($path, $iteratorMode),
\RecursiveIteratorIterator::SELF_FIRST,
\RecursiveIteratorIterator::CATCH_GET_CHILD
);
2.
/typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionTask.php:80
$directoryContent = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($directory),
\RecursiveIteratorIterator::LEAVES_ONLY,
\RecursiveIteratorIterator::CATCH_GET_CHILD
);
See attached patch.
Files
Updated by Martin Terber about 9 years ago
- Assignee set to Steffen Ritter
Hi Steffen, I don't know if assigning the issue is necessary. Feel free to assign it to someone else.
Updated by Martin Terber about 9 years ago
Correction: The patch actually provides three occurrences.
Updated by Martin Terber over 8 years ago
- Assignee deleted (
Steffen Ritter) - Target version deleted (
6.2.16)
Updated by Martin Terber over 8 years ago
I was not able to reproduce this in TYPO3 8.4.0.
The Scheduler task "File Abstraction Layer: Update storage index (scheduler)" is executed successfully without errors.
Unfortunately, I was not able to reproduce it in 6.2.26 locally.
However, I don't know if this means this bug is obsolete.
Updated by Sascha Egerer over 8 years ago
- Status changed from New to Accepted
- Assignee set to Sascha Egerer
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49852
Updated by Gerrit Code Review about 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49852
Updated by Gerrit Code Review about 8 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49852
Updated by Gerrit Code Review about 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50128
Updated by Sascha Egerer about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7a7c2d34a774d6e733c2b433260ff7211ab98ec1.