runelite / launcher

Launcher for RuneLite
https://runelite.net
BSD 2-Clause "Simplified" License
67 stars 96 forks source link

Fix file permissions and attributes #122

Closed YvesW closed 8 months ago

YvesW commented 8 months ago

Aims to reduce support traffic and improve user experience by:

  1. detecting and fixing filesystem permission (ACL/ACE related) and attribute (e.g. read only) problems, and 2. detecting and fixing login problems when the user launches RL with elevated permissions via a Jagex Launcher instance that's not running with elevated permissions Edit: dropped 2 and PRed again separately as requested.

Please do test these changes by breaking your permissions in a VM. In my testing, I broke my Windows user profile before I could break RL, but there are only so many way to break your file system that I could think of.

Regarding testing I recommend at least trying the following steps: WARNING: THIS TESTING PROCEDURE MIGHT BREAK YOUR USERPROFILE ON THE VM AFTER REBOOTING

  1. Create a fresh windows VM
  2. Create a new local user with admin rights so it's nbd if it gets bricked
  3. Install the updated launcher
  4. Set .runelite to read only
  5. To remove all permissions for your user account for .runelite and even all permissions for the subdirectory & files:
    icacls "%userprofile%\.runelite" /remove vmComputerNameHere\vmAccountNameHere /inheritance:r /t /c
  6. To remove permissions for your user account for %userprofile%:
    icacls "%userprofile%" /remove DESKTOP-QSUTV7K\LauncherTest2 /c
  7. Start RL & follow the on-screen instructions
  8. Success/failure
  9. Afterwards you could try running the following commands to try to prevent bricking your userprofile:
    icacls "%userprofile%" /grant:r vmComputerNameHere\vmAccountNameHere :F /inheritance:r /t /c
    icacls "%userprofile%" /grant:r *S-1-5-18:F /inheritance:r /t /c
    icacls "%userprofile%" /grant:r *S-1-5-32-544:F /inheritance:r /t /c
Adam- commented 8 months ago

added in d18cd8809b168f21e350e830a6bcacc567e09add / bd52052cc78898a68bd3ae88bcd3bfa4d210241f