Project

General

Profile

Bug #9689

Game files opened in rw mode

Added by kilobug almost 8 years ago. Updated over 4 years ago.

Status:
Closed
Severity:
Very Low
Assignee:
-
Category:
Application
Target version:
-
Start date:
05/05/2016
% Done:

100%

Version:
Platform:
Linux
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

I'm trying to make a script installing KSP (from GOG) once system-wide, and then individual users can run it and have their own saves/...

But the game opens many files in read-write mode, like GameData/Squad/Plugins/SaveUpgradePipeline.Scripts.dll or GameData/Squad/FX/IonPlume.mu, which can't work if they are owned by another user.

I know what I'm trying to do is not officially supported (hence the "Very Low" priority) but it does seem an odd behavior, even regardless of my purpose. Especially since those files aren't actually modified by the game, it just calls "open" with the O_RDWR mode instead of O_RDONLY, but then only performs reads.

Is there a reason for this ? Or could you easily fix it in a later build ?

History

#1 Updated by jonharson almost 8 years ago

You do know that plugin are all able to write their settings/data usually in a PluginData subfolder?
What you are trying to do is never going to work... you pretty much need all users to have r/w access to GameData anyway.

#2 Updated by kilobug almost 8 years ago

Yes, some directories (such as PluginData, savegames, snapshots, ...) need to be writable. What the script does is setup a directory in ~/.local/games/ksp, with writable version of those directories, and then symlinks to the GameData (and binary) in /usr/local/games/ksp; this kind of things work pretty well with many other games, but it doesn't with ksp because many game data files (like the ones of above) are opened in read/write mode.

But regardless of my actual attempts to hack around, if the game doesn't need to modify a file (and does it need to modify GameData/Squad/Plugins/SaveUpgradePipeline.Scripts.dll or GameData/Squad/FX/IonPlume.mu ?) it would be "cleeaner" to open them in read-only mode, don't you think so ? Some OS may do optimizations when something is opened in read-only, ...

#3 Updated by TriggerAu almost 8 years ago

  • Status changed from New to Needs Clarification

#4 Updated by chris.fulton over 4 years ago

  • Status changed from Needs Clarification to Resolved
  • % Done changed from 0 to 100

#5 Updated by chris.fulton over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF