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

@empjustine empjustine commented Apr 8, 2021

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 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

@empjustine empjustine commented Apr 8, 2021

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 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 PeterN commented Apr 8, 2021

@empjustine
Copy link
Author

@empjustine empjustine 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?

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

@TrueBrain TrueBrain commented Apr 9, 2021

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

@TrueBrain TrueBrain commented Apr 10, 2021

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!

@TrueBrain TrueBrain closed this Apr 10, 2021
@empjustine
Copy link
Author

@empjustine empjustine commented Apr 12, 2021

  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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants