Environment: Win7, Acquia dev desktop.
We installed Drupal via browser and installation went ok. After visiting the site first time we are getting the following warning:
Warning: rename(C:\Users\Username\Sites\drupal/sites/d8.localhost/files/php/service_container/.service_container_prod.php,C:\Users\Username\Sites\drupal/sites/d8.localhost/files/php/service_container/service_container_prod.php/58a1afbbaaba3ad71b02586ce30febed3a8bc77c1d45cc8c2f8ce18d067a17b4.php) [function.rename]: Access is denied. (code: 5) in Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save() (line 124 of core\lib\Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage.php).
We did git revert 701d4e6
and reinstalled Drupal from scratch again. The warning message didn't appear again.
Comment | File | Size | Author |
---|---|---|---|
#12 | FileStorage_under_Win.2099671.12.patch | 923 bytes | salvis |
#8 | FileStorage_under_Win.2099671.8.patch | 497 bytes | salvis |
Comments
Comment #1
chx CreditAttribution: chx commentedWe need more Windows 7 testers and someone to debug this :/
Comment #2
cosmicdreams CreditAttribution: cosmicdreams commentedI have a similar setup. Looking into it.
Comment #3
cosmicdreams CreditAttribution: cosmicdreams commentedOK, I installed D8 on my Windows 7 box (using commit 37949fe37843eed62b09aba8f2612e832df2953e) and didn't get any warnings or errors during the installation.
I'm using Acquia Dev Desktop version 7.22.24
Comment #4
cosmicdreams CreditAttribution: cosmicdreams commentedtonku, what are your environment's specifications?
Comment #5
tonku CreditAttribution: tonku commentedI have also Acquia Dev Desktop version 7.22.24 (with php version 5.3.18, apache 2.2.22, mysql 5.1.66-community).
I didn't get any warnings or errors during the installation, but after installation I clicked "Visit your new site." link and then the message appeared. After page refresh the error message disappears. There's no log entries in Drupal regarding that warning message.
Steps to reproduce the problem:
1. Install Acquia Dev Desktop in Windows 7
2. Use git to download Drupal 8:
git clone --branch 8.x http://git.drupal.org/project/drupal.git
3. Import site from Acquia Dev Desktop
4. Install the site via browser
5. Click "Visit your new site." link
In the community tools workshop the lady sitting next to me got the same warning message. She had Win7 and used git to download the files but unfortunately I don't know more info about the setup she was having.
I tried the same steps with another computer:
Mac with Oracle VirtualBox and Windows 7
Acquia Dev Desktop version 7.23.25 (with php version 5.3.18, apache 2.2.22, mysql 5.1.66-community)
...and got the same warning message.
Tell me if you need some more information or tests from me.
Comment #6
StuartJNCC CreditAttribution: StuartJNCC commentedI see the same thing. My setup has nothing to do with Acquia Dev Desktop!
Windows 7 professional Service pack 1, 64-bit, 3Gb RAM
Apache/2.2.25 (Win32)
PHP 5.3.27
MySQL 5.6.13
Get latest Drupal 8 either via GIT clone or downloading from https://drupal.org/node/572834
After finishing install and first going to "Visit your new site." link, I get a red message:
Warning: rename(D:\webstuff\www\drupal/sites/default/files/php/service_container/.service_container_prod.php,D:\webstuff\www\drupal/sites/default/files/php/service_container/service_container_prod.php/5e35ab8aedeb892bab51cdbb00193c21ee85e99cf7b779b0b9fa7787c2de49a8.php): Access is denied. (code: 5) in Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save() (line 124 of core\lib\Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage.php).
Do anything else on the site and the message does not occur again and things seem to work OK.
Comment #7
mradcliffeIs it possible that the file has an open resource handle because I think that is one of the causes for rename() to fail on Windows.
Comment #8
salvisSorry for butting in, but I need this to work. I have the same issue on Win7, upon installation and when installing/uninstalling modules.
If I help it along and manually do the rename() (aka moving), then the warning goes away, but watchdog still keeps logging
The problem is that #1908440-111: Relax MTimeProtectedFileStorage permissions for DX, drush integration and world domination removed the chmod() call to make the file(s) writable (in spite of the promise in the comment above). Under Windows you cannot delete a read-only file without first removing the read-only flag, and subsequently you cannot delete the non-empty directory.
The attached patch fixes this issue.
Comment #9
amateescu CreditAttribution: amateescu commentedI have the same issue and can confirm that the patch fixes it. Won't set it to RTBC though until we get more confirmations and approval from @chx :)
Comment #10
chx CreditAttribution: chx commentedOh hrm, Windows :( okay let's do it.
Comment #11
webchickCan we throw a quick comment there that explains why we're doing this so that someone doesn't try and "optimize" this code in the future and remove the call once again?
Comment #12
salvisComments adjusted.
Comment #14
salvisI don't think that's caused by the updated patch, which only changed some comments compared to #8...
Comment #15
amateescu CreditAttribution: amateescu commented#12: FileStorage_under_Win.2099671.12.patch queued for re-testing.
Comment #16
chx CreditAttribution: chx commentedTry #2
Comment #17
alexpottCommitted 28077fa and pushed to 8.x. Thanks!