-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"you don't have permission to modify this file" error on Windows #3492
Comments
I also saw this error on windows boxes but my suspicion is that it happens due to antivirus. At least, currently used antivirus sometimes causes similar problems on msbuilds too. I cannot switch off antivirus due to corporate policies. Could you, please, try to exclude antivirus stuff? |
Can you please paste a |
I also run into this problem every now and then. It's hard to reproduce because, as mentioned, re-running the command usually succeeds. The only anti-virus I have installed is Windows Defender. |
I think that Stack could have some kind of retry on some operations in case of such failure. |
I also am running into this issue: I usually do a |
We also experience this in our Windows CI (AppVeyor).
I have 2 more builds that failed due to this error just last week, all while building different packages. So the problem does look like how @varosi suspected:
I will add |
this appears to be a duplicate of #2617 |
@cleverca22 Ah good point. So, to others in this thread, and readers from searches: The likely workaround is to switch to GHC 8.2.1 |
This problem seems to be fixed on GHC 8.2.1, but there is another one which occurs the same way - randomly and prevent the build from finishing successfully. But it seems like it's another problem. |
Our latest appveyor build failed with: ``` ghc-pkg.EXE: C:\sr\snapshots\141c7015\pkgdb\package.cache: you don't have permission to modify this file ``` According to commercialhaskell/stack#3492, "The likely workaround is to switch to GHC 8.2.1", so this moves to lts-10.6 (ghc 8.2.2).
Our latest appveyor build failed with: ``` ghc-pkg.EXE: C:\sr\snapshots\141c7015\pkgdb\package.cache: you don't have permission to modify this file ``` According to commercialhaskell/stack#3492, "The likely workaround is to switch to GHC 8.2.1", so this moves to lts-10.6 (ghc 8.2.2).
On latest GHCs I don't get this message. |
Steps to reproduce
On Windows 10 x64 run:
Expected
Not to have this problem. Eventually to retry internally if it cannot modify this file. I suspect that this is some kind of multi-threading problem with write accessing this file.
Actual
At some time you'll get on Windows (not every time, but often):
If you retry the build - it continues and there is no problem. But on some larger projects two or three continues are needed. This is unacceptable on CI/CD systems or automatic retry mechanism should be implemented.
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: