Skip to content

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

Open
krzsztf1 wants to merge 1 commit into
jsuto:masterfrom
krzsztf1:fix-setuid-after-install
Open

krzsztf1 wants to merge 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
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.

1 participant