#87174.... typo3temp/var/cache/code/cache_core/site-configuration.php): Access is denied
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:
<?php
[]
#
No other “Access is denied” errors fopr other files appear.
Best regards
Eckard.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 15
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2019-01-14T11:46:20+00:00" > 01/14/19, 11:46 </span>
-
Eckard Gehrke commented and changed category PHP Version 7.3 <span data-processor="relativetime" data-value="2019-03-03T22:51:28+00:00" > 03/03/19, 22:51 </span>
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. -
Markus Dübbert commented and changed TYPO3 Version
98 PHP Version7.37.1 <span data-processor="relativetime" data-value="2019-06-28T05:23:14+00:00" > 06/28/19, 05:23 </span>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/55099local 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 -
Tymoteusz Motylewski commented <span data-processor="relativetime" data-value="2019-07-10T22:03:42+00:00" > 07/10/19, 22:03 </span>
for me on xampp with win 10
a workaround like$res = @rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename); if (!$res) { $e = copy($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename); unlink($temporaryCacheEntryPathAndFilename); }worked.
-
Stephan Salzmann commented <span data-processor="relativetime" data-value="2019-08-02T09:07:41+00:00" > 08/02/19, 09:07 </span>
Markus Dübbert wrote:
> local ddev installation on windows 10
If you start the docker-desktop with administrative priviliges the error disappears. -
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2020-01-10T15:39:03+00:00" > 01/10/20, 15:39 </span>
Tymoteusz Motylewski wrote:
> for me on xampp with win 10
> a workaround like
> […]
> worked.
>
> see also https://github.com/doctrine/common/pull/874I 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 (?) :/ )
-
Susanne Moog commented <span data-processor="relativetime" data-value="2020-01-21T08:26:40+00:00" > 01/21/20, 08:26 </span>
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
-
Randy Fay commented <span data-processor="relativetime" data-value="2020-01-21T19:07:30+00:00" > 01/21/20, 19:07 </span>
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 ?</projectroot>
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?
-
Susanne Moog changed category <span data-processor="relativetime" data-value="2020-03-26T09:24:31+00:00" > 03/26/20, 09:24 </span>
-
Michael Stucki commented <span data-processor="relativetime" data-value="2020-07-08T17:53:55+00:00" > 07/08/20, 17:53 </span>
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 ?<br>> <br>> 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?</projectroot>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.
-
Michael Stucki changed TYPO3 Version
810 PHP Version7.17.2 <span data-processor="relativetime" data-value="2020-07-08T18:05:45+00:00" > 07/08/20, 18:05 </span> -
Michael Stucki commented <span data-processor="relativetime" data-value="2020-07-08T18:18:45+00:00" > 07/08/20, 18:18 </span>
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.
-
Michael Stucki changed Related to #91768 <span data-processor="relativetime" data-value="2020-07-08T18:18:52+00:00" > 07/08/20, 18:18 </span>
-
Simon Schaufelberger changed Tags ddev, windows, xampp <span data-processor="relativetime" data-value="2022-04-27T00:38:48+00:00" > 04/27/22, 00:38 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2025-03-13T20:37:27+00:00" > 03/13/25, 20:37 </span>as https://forge.typo3.org/issues/91768 has been solved and this issue is rather old and a lot changed, I am closing this issue.
feel free to reopen or comment if still valid for you in latest versions
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)