SubnauticaNitrox / Nitrox

An open-source, multiplayer modification for the game Subnautica.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add "Service" project that handles system configuration, which demands admin permissions

Measurity opened this issue · comments

commented

Situation

Nitrox doesn't have permission to the directory C:\Program Files (x86)\Steam\steamapps\common\Subnautica by default. Currently, we request Nitrox to run as admin in its entirety to mitigate, which is a security concern.

Proposal

Add a new CLI project that is executed by the launcher to grant the necessary permissions to the launcher executable. The CLI project must only contain specific code to help Nitrox, not to allow general access to system config by non-Nitrox code.

We should also add an "uninstall record" via this CLI project, so that Windows users can stick to the convention of using the "Add or remove program" feature to remove Nitrox.

Remarks

Many programs offer an installer that would configure a user's system (i.e. grant file permissions) to the just-installed software. But I personally prefer to keep it simple and installer free.

Related: #1474

Through digging, the things ive discovered about steam, Steam Game folders are created by default with read, write, and execute permission for the AuthenticatedUsers group, which all users on a Windows Operating System who have Signed in are a part of, The NitroxLauncher inherits this group when being launched as well by default.

Thus, we should have no reason to be requesting admin permission for Steam games, Epic Games also likely follows the same format. The only reason admin permissions should be required is in the event of files being created by Nitrox in the past due to improper advice and a lack of forethought on our part regarding the issue.

As for one of the first instances of Administrator being recommended as a fix, https://gyazo.com/dbc9feb77333708d72d8a99c19695a34 it was for Epic Games and even Epic Games https://gyazo.com/482d5f4fae40bd21cc0dd6b34ccffb68 failed to manage the folder.