Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#15,867 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@emirmrkaljevic がすでに取り組んでいます。

2026年10月26日 から。

  • #15868 @emirmrkaljevic による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

まず tests/by-util/test_chown.rs、特に test_chown_file_notexisting 内のコメントアウトされたアサーションを確認し、次にそれが検証する chown と chgrp のエラー処理を調べてください。オペランドがない場合と f/ のケースのテストを追加し、ぶら下がりシンボリックリンクに対する期待される文言「cannot dereference」は維持してください。両方のユーティリティでテストが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
24.3k
フォーク
2.1k
平均マージ
1日 21時間
マージ済み PR(30日)
360

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

uutils/coreutils のほかの issue

uutils/coreutils の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。