Skip to content

Add a script and README section for the drive capability on Linux - #1059

Merged
mnadareski merged 2 commits into
SabreTools:masterfrom
gmipf:pr/11-setcaps-script
Oct 18, 2026
Merged

mnadareski merged 2 commits into
SabreTools:masterfrom
gmipf:pr/11-setcaps-script

Conversation

@gmipf

@gmipf gmipf commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

On Linux, redumper and DiscImageCreator send Plextor vendor commands that the kernel only allows for programs with CAP_SYS_RAWIO. Without it, these commands fail unless MPF runs with sudo. This adds scripts/setcaps.sh, which sets the capability on these two programs in an unpacked MPF folder, and a README section with the two setcap commands for anyone who prefers to run them by hand. The script is not part of the builds.

Measured with the MPF.CLI 3.11.1 linux-x64 zip on Fedora 44 and Ubuntu 26.04, as a normal user with a Plextor PX-760A:

  • before: the bundled redumper stops at once with error: SYSTEM (Operation not permitted)
  • sudo sh setcaps.sh <folder> sets cap_sys_rawio=ep on both programs; a folder without DiscImageCreator, as in the arm64 zip, is skipped with a message
  • after: the bundled redumper dumps as the normal user

Unpacking does not keep the capability: zip does not store it, and tar run by a normal user drops it with exit code 0. That is why this is a separate step after every download.

Prepared with AI assistance (Claude Opus 5.5) and reviewed before submission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread scripts/setcaps.sh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mnadareski
mnadareski merged commit 8ec658b into SabreTools:master Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants