Skip to content

src/Makefile.in: explicit chmod after install to preserve setuid bits - #499

Merged
jsuto merged 1 commit into
jsuto:masterfrom
krzsztf1:fix-setuid-after-install
Oct 7, 2026
Merged

jsuto merged 1 commit into
jsuto:masterfrom
krzsztf1:fix-setuid-after-install

Conversation

@krzsztf1

@krzsztf1 krzsztf1 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

install -m 6755 -o USER -g GROUP silently drops the setuid/setgid bits with rust-coreutils, which Ubuntu 26.04 ships as the default /usr/bin/install. It calls chown after chmod, and Linux clears those bits on chown.

Re-applying the mode explicitly makes the build produce working binaries regardless of which install implementation is present.

Refs #490, uutils/coreutils#9134

install -m 6755 -o USER -g GROUP silently drops the setuid/setgid bits with
rust-coreutils, which Ubuntu 26.04 ships as the default /usr/bin/install.
It calls chown after chmod, and Linux clears those bits on chown.

Re-applying the mode explicitly makes the build produce working binaries
regardless of which install implementation is present.

Refs jsuto#490, uutils/coreutils#9134
@krzsztf1
krzsztf1 requested a review from jsuto as a code owner September 8, 2026 22:56

@jsuto jsuto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jsuto
jsuto merged commit 5dbf7cb into jsuto:master Oct 7, 2026
4 checks 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