[BUGFIX] Properly set file permissions for FileLocks 68/39268/2
authorMarkus Klein <markus.klein@typo3.org>
Mon, 4 May 2015 21:46:58 +0000 (23:46 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 5 May 2015 08:43:21 +0000 (10:43 +0200)
The FileLockStrategy now calls fixPermissions() in order to keep
the lock file accessible if a lock is created by a different user.
(e.g. via CLI)

Resolves: #66790
Releases: master
Change-Id: I607e6f4f8546878db4f3ba4d90275ab6860b2537
Reviewed-on: http://review.typo3.org/39268
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Andreas Allacher <andreas.allacher@gmx.at>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Locking/FileLockStrategy.php

index f61eb00..53214d4 100644 (file)
@@ -93,6 +93,7 @@ class FileLockStrategy implements LockingStrategyInterface {
                if ($this->filePointer === FALSE) {
                        throw new LockAcquireException('Lock file could not be opened', 1294586099);
                }
+               GeneralUtility::fixPermissions($this->filePath);
 
                $operation = $mode & self::LOCK_CAPABILITY_EXCLUSIVE ? LOCK_EX : LOCK_SH;
                if ($mode & self::LOCK_CAPABILITY_NOBLOCK) {