`chown` cannot change ownership to a user with usernames that are not UTF-8
Open
Nobody has claimed this yet.
U - chown
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
With uutils:
$ user=$(LC_ALL=en_US.ISO-8859-1 printf '\xC2')
$ ./target/debug/chown $user:$user file
error: invalid UTF-8 was detected in one or more arguments
For more information, try '--help'.
$ ls -l file
-rw-r--r--. 1 collin collin 0 Dec 31 13:14 file
With GNU:
$ user=$(LC_ALL=en_US.ISO-8859-1 printf '\xC2')
$ chown $user:$user file
$ ls -la file | iconv --from-code=ISO-8859-1 --to-code=UTF-8
-rw-r--r--. 1 Â Â 0 Dec 31 21:15 file
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 at the chown command entry point and reproduce the ISO-8859-1 username example from the issue. Compare the behavior with GNU chown and verify that valid non-UTF-8 usernames no longer produce the invalid UTF-8 argument error while ownership is changed as expected.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100