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 "Service" project that handles system configuration, which demands admin permissions #2081

Open
Measurity opened this issue Sep 29, 2023 · 2 comments
Labels
Area: setup Related to installing or configuring Nitrox

Comments

@Measurity
Copy link
Collaborator

Measurity commented Sep 29, 2023

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 Nitrox.Service project that is executed by the launcher to grant the necessary permissions to the launcher executable. The Service 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 Service project, so that Windows users can stick to the convention of using the "Add or remove program" feature to remove Nitrox.

Remarks

The JetBrains Rider IDE and Rockstar Game Launcher both use this design. They install a "Windows Service" process, which is running as the SYSTEM user on Windows. This allows them to make changes without requesting admin.

Related: #1474

@killzoms
Copy link
Collaborator

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.

@killzoms
Copy link
Collaborator

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.

@Measurity Measurity changed the title Add CLI project that handles system configuration, which demands admin permissions Add "Service" project that handles system configuration, which demands admin permissions Dec 26, 2023
@Measurity Measurity added the Area: setup Related to installing or configuring Nitrox label Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: setup Related to installing or configuring Nitrox
Projects
None yet
Development

No branches or pull requests

2 participants