Skip to content

chown: warn when '.' is used as owner:group separator#11438

Open
eyupcanakman wants to merge 5 commits intouutils:mainfrom
eyupcanakman:fix/chown-dot-separator-warning-11352
Open

chown: warn when '.' is used as owner:group separator#11438
eyupcanakman wants to merge 5 commits intouutils:mainfrom
eyupcanakman:fix/chown-dot-separator-warning-11352

Conversation

@eyupcanakman
Copy link

GNU chown emits a diagnostic when '.' is used instead of ':' as the owner:group separator. The uutils version silently accepted it.

Now emits warning: '.' should be ':': '<spec>' matching GNU behavior. Both owner and group are still applied correctly when the dot separator is used.

Closes #11352

When the spec contains '.' but no ':', emit a warning matching GNU
coreutils behavior: "warning: '.' should be ':': '<spec>'"

Closes uutils#11352
@eyupcanakman eyupcanakman force-pushed the fix/chown-dot-separator-warning-11352 branch from 20cc0f4 to 1b32857 Compare March 21, 2026 06:45
sylvestre and others added 2 commits March 21, 2026 12:18
On BSDs, new files inherit the group from the parent directory
(e.g. /tmp -> wheel) rather than the user's primary group. Accept
both "retained as" and "changed ownership" in the verbose output
since either confirms the dot separator was parsed correctly.
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 22, 2026

Merging this PR will not alter performance

✅ 300 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing eyupcanakman:fix/chown-dot-separator-warning-11352 (958bd70) with main (d62acaf)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

let gid = parse_gid(group, spec)?;
return Ok((uid, gid));
}
show_warning!("'.' should be ':': {}", spec.quote());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the translate!() macro

Move the warning string to locale .ftl files so it follows the
project's i18n pattern.
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/misc/io-errors is no longer failing!
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.
Congrats! The gnu test tests/csplit/csplit-heap is now passing!

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/io-errors is no longer failing!
Congrats! The gnu test tests/csplit/csplit-heap is now passing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chown: warning message

2 participants