victory play: a start below Medium integrity says why it cannot write, and the icacls fix (#706) #3215

Closed
opened 2026-11-29 20:46:10 +00:00 by github-bot · 0 comments
Owner

@⁠kibagami-nc on GitHub · 2026-11-29 20:46 UTC · original

From #706.

What happens

On some PCs, victory play stops at its start:

creating C:\Users\…\AppData\Local\victory\logs: Access is denied. (os error 5)

That happens even though cmd in the same session can create that folder. In #706 it looked random and was blamed on the antivirus. @⁠akabkgod found the cause:

  • The cause: victory.exe carried a Low integrity label, inherited from the folder it was extracted into (icacls victory.exe showed Mandatory Label\Low Mandatory Level:(I)(NW)).
  • Why that blocks: Windows starts a program at the lower of the user's level and its file's label. At Low, a process cannot write a Medium folder, and %LOCALAPPDATA%\victory is one.
  • The fix: icacls victory.exe /setintegritylevel M made the logger write on the next start.

The change

A start below Medium now prints, beside the existing memory warning and before the home folder is created:

victory.exe runs at Low integrity, below Windows' usual Medium: it cannot write its settings, logs or
caches under %LOCALAPPDATA%\victory ("access denied"). The level comes from victory.exe's own file, which
is labelled Low when it was extracted into a folder that is.
Fix: in victory.exe's folder, run  icacls victory.exe /setintegritylevel M  and start it again.
  • The level: integrity_level reads it from the process token's mandatory label (OpenProcessToken, GetTokenInformation(TokenIntegrityLevel), the SID's last sub-authority).
  • The text: integrity_warning turns the level into the text, and says nothing at Medium and above, or when the level can't be read.
  • Cargo.toml: apps/victory asks windows-sys for Win32_Security and Win32_System_Threading too. Cargo.lock doesn't change.

Nothing changes at Medium or High, which is every ordinary start.

Tests

  • New: play::tests::a_start_below_medium_integrity_is_warned_with_the_fix:
    • Low and Untrusted are warned, with the icacls line;
    • Medium, High, System and an unread level are not;
    • the test process's own level can be read.
  • cargo test -p victory --locked: 80, 1 and 2 passed.
  • cargo clippy -p victory --all-targets: nothing in play.rs.

Not run here at Low itself: no PC here has a Low-labelled copy.

Pull request details or commits were not available from GitHub; kept as an issue.

**@⁠kibagami-nc** on GitHub · 2026-11-29 20:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3215) From #706. ## What happens On some PCs, `victory play` stops at its start: ``` creating C:\Users\…\AppData\Local\victory\logs: Access is denied. (os error 5) ``` That happens even though `cmd` in the same session can create that folder. In #706 it looked random and was blamed on the antivirus. @⁠akabkgod found the cause: - **The cause:** `victory.exe` carried a Low integrity label, inherited from the folder it was extracted into (`icacls victory.exe` showed `Mandatory Label\Low Mandatory Level:(I)(NW)`). - **Why that blocks:** Windows starts a program at the lower of the user's level and its file's label. At Low, a process cannot write a Medium folder, and `%LOCALAPPDATA%\victory` is one. - **The fix:** `icacls victory.exe /setintegritylevel M` made the logger write on the next start. ## The change A start below Medium now prints, beside the existing memory warning and before the home folder is created: ``` victory.exe runs at Low integrity, below Windows' usual Medium: it cannot write its settings, logs or caches under %LOCALAPPDATA%\victory ("access denied"). The level comes from victory.exe's own file, which is labelled Low when it was extracted into a folder that is. Fix: in victory.exe's folder, run icacls victory.exe /setintegritylevel M and start it again. ``` - **The level:** `integrity_level` reads it from the process token's mandatory label (`OpenProcessToken`, `GetTokenInformation(TokenIntegrityLevel)`, the SID's last sub-authority). - **The text:** `integrity_warning` turns the level into the text, and says nothing at Medium and above, or when the level can't be read. - **Cargo.toml:** `apps/victory` asks `windows-sys` for `Win32_Security` and `Win32_System_Threading` too. `Cargo.lock` doesn't change. Nothing changes at Medium or High, which is every ordinary start. ## Tests - **New:** `play::tests::a_start_below_medium_integrity_is_warned_with_the_fix`: - Low and Untrusted are warned, with the `icacls` line; - Medium, High, System and an unread level are not; - the test process's own level can be read. - `cargo test -p victory --locked`: 80, 1 and 2 passed. - `cargo clippy -p victory --all-targets`: nothing in `play.rs`. Not run here at Low itself: no PC here has a Low-labelled copy. *Pull request details or commits were not available from GitHub; kept as an issue.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 20:46:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#3215
No description provided.