Skip to content
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

Ramsomware Protection preventing NewGRF download #8970

Closed
empjustine opened this issue Apr 8, 2021 · 8 comments
Closed

Ramsomware Protection preventing NewGRF download #8970

empjustine opened this issue Apr 8, 2021 · 8 comments

Comments

@empjustine
Copy link

Version of OpenTTD

1.11.0, Windows, Steam binary release.

Expected result

Successful download of https://bananas.openttd.org/ online content.

Actual result

Dialog box:

Message
Downloading failed...
... file not writable

Console output:
ERROR: Downloading failed... ... file not writeable

Steps to reproduce

Windows Defender Ramsomware Protection Controlled folder access turned on, protecting %USERPROFILE%\Documents\ by default.

Attempting to download online content from https://bananas.openttd.org/ via
NewGRF Settings > Check Online Content > Content downloading

@empjustine empjustine changed the title Windows Ramsomware Protection preventing NewGRF download Apr 8, 2021
@James103
Copy link
Contributor

James103 commented Apr 8, 2021

Are you able to save screenshots, savegames, and/or scenarios?
For screenshots: Run command screenshot, or use any of the screenshot buttons in the "Take a screenshot" menu.
For savegames: Start a new game, then save the game.
For scenarios: Open the scenario editor, then save the scenario.

@empjustine
Copy link
Author

save screenshots

ERROR: Screenshot failed!

savegames

ERROR: Game Save Failed?File not writeable
Only work if saved inside a folder outside %USERPROFILE%\Documents\ or other Ramsomware Protection Controlled Folder.

scenarios

Same, only work if saved inside a folder outside %USERPROFILE%\Documents\ or other Ramsomware Protection Controlled Folder.

@James103
Copy link
Contributor

James103 commented Apr 8, 2021

  1. Can you try downloading and installing OpenTTD from https://openttd.org, then downloading NewGRFs or saving screenshots, scenarios, and/or savegames?
  2. Can you try downloading OpenTTD (portable version / zip archive), extracting that to a seperate folder, running OpenTTD from there, then downloading NewGRFs or saving screenshots, scenarios, and/or savegames?

@PeterN
Copy link
Member

PeterN commented Apr 8, 2021

You can add an allowed app to Windows Security's controlled folder access.

https://support.microsoft.com/en-us/windows/allow-an-app-to-access-controlled-folders-b5b6627a-b008-2ca2-7931-7e51e912b034

@empjustine
Copy link
Author

  1. Can you try downloading and installing OpenTTD from https://openttd.org, then downloading NewGRFs or saving screenshots, scenarios, and/or savegames?

Fails immediatly after pressing Yes, download the [OpenGFX] graphics.

Downloading failed

Downloading graphics failed. Please download graphics manually.

You can add an allowed app to Windows Security's controlled folder access.

Can I change the default folder where OpenTTD persists data instead?

@TrueBrain
Copy link
Member

Not the answer you might want to read, but this is a known problem and not one easily resolved. Let me explain first what is happening, and I give some solutions in the end.

That OpenTTD stores its data in the Documents folder on its own is not the issue. The problem is that, as this is a new version of OpenTTD, Microsoft is still evaluating if our binary is doing something evil. As it builds up score over time, this will be less and less of a problem (reputation score).

If we would sign (#8056) our binaries, that will quicken the process by a lot. We are working on this, but it is a slow process to get a code signing certificate (long story, poke me on Discord / IRC if you want details). So for now this is a bit what we have to deal with till Microsoft realised again this version too is not harmful (they are fully correct in giving this some time btw).

That gives you as user two options:

  1. add OpenTTD as exception to Windows Defender (see link above)
  2. use the portable version of OpenTTD. Download the zip. Extract it anywhere not under Windows Defender's control. Either copy your current openttd.cfg to this folder or create an empty openttd.cfg in that folder. Start openttd.exe from there. OpenTTD will now write all new files in that folder.

Both basically bypass Windows Defender, so both are equally "bad" or "good", what ever your frame of reference is.

Hope this helps!

@TrueBrain
Copy link
Member

Looked into it some more, and indeed, solving #8056 should really help preventing this issue. So I am going to close this ticket for now, as having two tickets with the same solution is not helpful to us :) Let us know if either of the two options doesn't work, and we can help out further.

Tnx for the report, especially the details. Much appreciated!

@empjustine
Copy link
Author

  1. use the portable version of OpenTTD.

This doesn't work as well, for the same reasons of the others (it tries to write inside %USERPROFILE%/Documents)

The tip to create the openttd.cfg on the openttd folder also works for the steam Release. I now have another issue where I can't download anything that is not a NewGRF but that's another, new issue. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants