Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

chown, chgrp: 'cannot dereference' instead of 'cannot access' for a missing operand

Open Beginner friendly
#15,867 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@emirmrkaljevic is already working on this.

Since Oct 26, 2026.

  • #15868 by @emirmrkaljevic — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start with tests/by-util/test_chown.rs, especially the commented-out assertion in test_chown_file_notexisting, then inspect the chown and chgrp error handling it exercises. Add coverage for missing operands and the f/ case, while preserving the expected “cannot dereference” wording for dangling symlinks; done when the tests pass for both utilities.

Written by the indexing model from the issue text.

Description

U - chgrp U - chown

For a missing operand, chown and chgrp say "cannot dereference" where GNU says "cannot access". GNU only uses "cannot dereference" when the operand is a symlink whose target can't be reached.

$ touch f
$ chown "$(id -u)" f/ nosuch/x     # GNU coreutils 9.12
chown: cannot access 'f/': Not a directory
chown: cannot access 'nosuch/x': No such file or directory
$ uu-chown "$(id -u)" f/ nosuch/x
chown: cannot dereference 'f/': Not a directory
chown: cannot dereference 'nosuch/x': No such file or directory

chgrp behaves the same way. A dangling symlink (ln -s missing l; chown "$(id -u)" l) gives "cannot dereference" in both, which is correct. tests/by-util/test_chown.rs already has a commented-out assertion for this in test_chown_file_notexisting.

Found with behave, a tool that records a CLI's behaviour and replays it against another implementation.

Dominant language
Rust
Stars
24.3k
Forks
2.1k
Avg merge
1d 21h
Merged PRs (30d)
357

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.