uutils / uutils/coreutils

`chown` cannot change ownership to a user with usernames that are not UTF-8

Open
#9,958 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.