Read-only file is getting changed by software?


Recommended Posts

So theres this bug in a new game NFS: Rivals that makes any changes to the settings in-game to never actually take.  The game forces all settings to 'max' and wont let you lower them.  So I figured I could manually edit the settings file, and set it to read-only, and that way the game couldn't change the file.

 

But it is.  I've tried 3 times now.  I'll edit the settings file, I'll right click on it, click properties, and check the "read only" box, and click OK.  Then I'll start up the game and close the game, and find that the file has been modified and is no longer set to read-only.  How the heck is this possible?!  What's the point of read-only if any program can modify it any time it wants?

 

Note:  The game is NOT running in administrator mode.

Link to comment
Share on other sites

Who owns the file.. you or the system? If you own it, and you're running a program as yourself, then yea the program can do whatever it likes with it.

Link to comment
Share on other sites

Yeah, just make sure the program isn't running as a user that has access to modify it. Take permission away from yourself even if you have to and just leave it for Administrator. Can't promise that won't crash the game though when it can't access the file as it likes.

Link to comment
Share on other sites

read only is an attribute not any sort of access control.. Now if set, if I recall correctly the API should not give the application write access to the file, UNLESS the application specifically requests write - then it gets it.

But yeah as mentioned that is not going to block an application or user from writing to the file, if write access was requested when the file was open.

So you need to change the NTFS permissions on the file to DENY WRITE/MODIFY/ETC whatever account is being used to access the file in the application, I would assume the game would run as the account that launched it.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.