-
Notifications
You must be signed in to change notification settings - Fork 234
Description
This bug seems still to bite me. But not in gerneral:
On my development machine (same Typo3 V12.4. php8.1) everything is OK, but installing on a live-Server this issue drives you mad.I am not the best developer, but I checked:
- GeneralUtility::writeFile() does not explicitly set a right
- the behavior is platform-specific and unstable (locally it works, live not)
When writing temporary JS files in AssetService.php (e.g. $tmpFile), the file permissions are set to 0600 depending on the system. This prevents loading in the FE if the umask is restrictive.
Suggestion: After GeneralUtility::writeFile() explicitly set @chmod($tmpFile, 0644).Classes/Service/AssetService.php:
781 > GeneralUtility::writeFile($tmpFile, $contents, true);
782 > + @chmod($tmpFile, 0644);
783 > if (@rename($tmpFile, $file) === false) {So far the bug only occures with JavaScript files, not CSS. But this is not really tested.