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

Add solution to "permission denied" error message #2556

Open
ArranTuna opened this issue Feb 20, 2022 · 6 comments
Open

Add solution to "permission denied" error message #2556

ArranTuna opened this issue Feb 20, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@ArranTuna
Copy link
Collaborator

Describe the bug
Randomly, the MTA client is unable to join servers due to:

HTTP server file mismatch! (resource) fileName [CRC could not open file: Permission denied]

The solution is to restart MTA.

To reproduce
Unknown as quite rare / random.

Expected behaviour
Since fixing the bug may be too difficult (I've heard that the web server system is really old and too difficult to update) a good quick fix is to simply add something like "Restarting MTA may fix this" to the "CRC could not open file: Permission denied" error message. Players will think that the server they're trying to join is causing the error when it's actually a client side issue so would avoid time wasted reporting and investigating.

Screenshots

Version
Multi Theft Auto v1.5.9-release-21129

Additional context

@ArranTuna ArranTuna added the bug Something isn't working label Feb 20, 2022
@Fernando-A-Rocha
Copy link
Contributor

Yep. A button to restart MTA to attempt to fix the issue should do the trick.

@matheustkn
Copy link
Contributor

Even restarting the MTA is not enough, sometimes the user really needs to open the game as an administrator.

@Fernando-A-Rocha
Copy link
Contributor

Even restarting the MTA is not enough, sometimes the user really needs to open the game as an administrator.

Shouldn't MTA force the user to open the game always as administrator? 🤨

@AlexTMjugador
Copy link
Member

AlexTMjugador commented May 24, 2022

Shouldn't MTA force the user to open the game always as administrator? 🤨

I don't think it should. Windows introduced UAC because it is a bad security practice to run processes as administrator when they don't really need that many privileges. Moreover, requiring administrator rights renders MTA unusable by non-administrator users, which is troublesome for computers that have several user accounts or are not controlled by the player.

In my view, the best course of action for MTA is to fix the underlying problem, or at most tweak the error message to point out that a restart may help, but launching it as an administrator should be a no-go.

@Lpsd
Copy link
Member

Lpsd commented May 25, 2022

I agree, we should try to fix the issue.

I've actually just managed to replicate this error, by;

  • having a server configured to use an external HTTP server (nginx)
  • starting a resource which requires files to be downloaded
  • watching the HTTP connections fail and it revert to internal HTTP server for each request
  • restarting the resource while the download requests are still being made / failing / reverting to internal HTTP

This causes the CRC could not open file message on some files which previously had requests, whose operations were likely interrupted improperly/prematurely. It's clearly not freeing the file handle correctly that's still attached to our process (so there is still a lock on those files), just needs actually investigating/debugging.

Note: no idea if having an external HTTP server is required to reproduce, it may just be enough to restart a resource that's in the middle of downloading "normally" through internal HTTP. It's just how my local is setup (to use nginx - which I'd forgotten to run before launching my server).

@Dutchman101
Copy link
Member

More information is from this comment onwards, in issue #1340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants