uutils / uutils/coreutils

setuid bits are not set when using `install`

Open
#9,134 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

U - install
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Using the -m flag of install to set the modifiers to 4755 does not work.

See the following example:

$ touch source_file
$ sudo install -m4755 source_file dest_file

$ stat dest_file
# expected output
...
Access: (4755/-rwsr-xr-x)

# actual output
Access: (0755/-rwxr-xr-x)

Edit: it's also worth mentioning that this is version 0.3.0 of uutils-coreutils

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the install command's handling of the -m flag and compare the requested 4755 mode with the resulting file permissions. Reproduce the example on the current version, then add or update the relevant install regression test so setuid bits are preserved and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.