Bug #87174
open.... typo3temp/var/cache/code/cache_core/site-configuration.php): Access is denied
0%
Description
Hi,
after upgrade from 8.7.13 I am getting now this error very frequently in the log:
Core: Error handler (BE): PHP Warning: rename(C:/dev_95/typo3temp/var/cache/code/cache_core/5c16b9b2bd900101327003.temp,C:/dev_95/typo3temp/var/cache/code/cache_core/site-configuration.php): Access is denied. (code: 5) in C:\dev_95\typo3\sysext\core\Classes\Cache\Backend\SimpleFileBackend.php line 234
Looking to the files it seems to be just an empty php files:
[] #
No other "Access is denied" errors fopr other files appear.
Best regards
Eckard.
Updated by Riccardo De Contardi almost 6 years ago
I get the same errors on a XAMPP environment (windows 10); my installation is TYPO3 9.5.3, completely fresh installation (nothing installed except system extensions and empty default page)
Updated by Eckard Gehrke over 5 years ago
- Category deleted (
Backend API) - PHP Version set to 7.3
Hi,
has anybody else the same problem and found a solution in the meantime?
It seems to be a windows problem.
When a file is locked it cannot be renamed:
\typo3\sysext\core\Classes\Cache\Backend\SimpleFileBackend.php line 237
I found a suggestion
(https://stackoverflow.com/questions/12894822/access-denied-error-on-rename-call-when-uploading-files-in-symfony)
try {
rename($temporaryCacheEntryPathAndFilename,$cacheEntryPathAndFilename);
} catch(\Exception $e) {
if (copy($temporaryCacheEntryPathAndFilename,$cacheEntryPathAndFilename)) {
unlink($temporaryCacheEntryPathAndFilename);
}
}
But that does not solve the issue here.
Best regards
Eckard.
Updated by Markus Dübbert over 5 years ago
- TYPO3 Version changed from 9 to 8
- PHP Version changed from 7.3 to 7.1
I get the same error:
Core: Error handler (BE): PHP Warning: rename(/var/www/html/web/typo3temp/var/Cache/Data/flux/5d1587584590b881734967.temp,/var/www/html/web/typo3temp/var/Cache/Data/flux/flux_content_types): No such file or directory in /var/www/html/vendor/typo3/cms/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 236
the error occured after deinstalling/installing an extension.
see also
https://forge.typo3.org/issues/84123
https://forge.typo3.org/issues/55099
local ddev installation on windows 10
is there a solution for this yet?
update:
the problem for me is:
https://github.com/docker/for-win/issues/525
Updated by Tymoteusz Motylewski over 5 years ago
for me on xampp with win 10
a workaround like
$res = @rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename); if (!$res) { $e = copy($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename); unlink($temporaryCacheEntryPathAndFilename); }
worked.
Updated by Stephan Salzmann about 5 years ago
Markus Dübbert wrote:
local ddev installation on windows 10
If you start the docker-desktop with administrative priviliges the error disappears.
Updated by Riccardo De Contardi almost 5 years ago
Tymoteusz Motylewski wrote:
for me on xampp with win 10
a workaround like
[...]
worked.
I tried to modify the file /typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php but the error seems still present (but it is not reported on the log (?) :/ )
Updated by Susanne Moog almost 5 years ago
Additional info: on ddev environments you can get rid of the error with https://stackoverflow.com/questions/57554778/how-can-i-fix-the-caching-issue-in-typo3-and-ddev
Updated by Randy Fay almost 5 years ago
It seems to me that the root of this is that TYPO3 uses a filesystem as if it were tmpfs (<projectroot>/var/cache) when that may well be a slow filesystem, as it is whenever it's mounted from anywhere, as with ddev. Is there a reason that TYPO3 doesn't have a configured cache directory that's actually tmpfs, for example just pointing it to /tmp ?
For ddev, it would be possible to work around this by automatically setting var/cache to be a tmpfs mount. But since the problem appears in many environments (mostly Windows it seems) it may be better to just move that cache to a more appropriate place?
Updated by Michael Stucki over 4 years ago
Randy Fay wrote:
It seems to me that the root of this is that TYPO3 uses a filesystem as if it were tmpfs (<projectroot>/var/cache) when that may well be a slow filesystem, as it is whenever it's mounted from anywhere, as with ddev. Is there a reason that TYPO3 doesn't have a configured cache directory that's actually tmpfs, for example just pointing it to /tmp ?
For ddev, it would be possible to work around this by automatically setting var/cache to be a tmpfs mount. But since the problem appears in many environments (mostly Windows it seems) it may be better to just move that cache to a more appropriate place?
Good idea to offer a tmpfs cache! Unfortunately it looks like the cache directory can't be changed because the setter function setCacheDirectory() is never called in TYPO3 v10.
So the most simple way to do this is to mount a tmpfs filesystem on top of typo3temp/var/Cache/.
On a single-host site, the workaround using tmpfs would work. However, in a multi-host setup with a single database, the typo3temp folder should be the same on all hosts, therefore it needs to be shared using NFS, CephFS, etc.
Updated by Michael Stucki over 4 years ago
- TYPO3 Version changed from 8 to 10
- PHP Version changed from 7.1 to 7.2
Updated by Michael Stucki over 4 years ago
I was adding comments here because I ran into a very similar problem. However, just decided to move my comments into a separate issue #91768.
Updated by Michael Stucki over 4 years ago
- Related to Bug #91768: Race condition while caching data using SimpleFileBackend added
Updated by Simon Schaufelberger over 2 years ago
- Tags set to ddev, windows, xampp