DISM does not work properly when run with sudo
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.9k
- Forks
- 180
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 2
Description
Sudo for Windows version
1.0.0
Windows build number
10.0.26100.0
Other Software
Note that it does work if you don't use sudo and just run DISM in an elevated shell.
Steps to reproduce
sudo dism /Online /Cleanup-Image /RestoreHealth
sudo is set to inline mode
Expected Behavior
DISM works
Actual Behavior
❯ sudo dism /Online /Cleanup-Image /RestoreHealth
Deployment Image Servicing and Management tool
Version: 10.0.26100.1
Error: 31
An error occurred while creating the log file.
Ensure that the path to the log file exists and that you have Read/Write permissions on the folder where the log files will be created.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing sudo dism /Online /Cleanup-Image /RestoreHealth on Windows build 10.0.26100.0 with sudo in inline mode, then compare it with DISM in an elevated shell. Investigate the error about creating the log file and verify the fix by confirming DISM completes through sudo without Error 31.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100