Public bug reported:

From the GNU chown manpage.

If a colon but no group name follows the user name, that user is made
the owner of the files and the group of the  files is changed  to that
user's login group.

However, the rust-coreutils version of chown does not do this. If given an id 
followed by just a colon it leaves the group unchanged.
The rust versions are supposed to be drop-in replacements for the GNU utils.

Here's the evidence.

root@parent:~# touch test
root@parent:~# ls -l test
-rw-r--r-- 1 root root 0 May 18 02:15 test
root@parent:~# gnuchown sys: test
root@parent:~# ls -l test
-rw-r--r-- 1 sys sys 0 May 18 02:15 test
root@parent:~# gnuchown root: test
root@parent:~# ls -l test
-rw-r--r-- 1 root root 0 May 18 02:15 test
root@parent:~# 
root@parent:~# /usr/lib/cargo/bin/coreutils/chown sys: test
root@parent:~# ls -l test
-rw-r--r-- 1 sys root 0 May 18 02:15 test


NOTE: this is on a 25.10 system, but it happens just the same on a 26.04 
system.  I just happen to be on a 25.10 system reporting it.

ProblemType: Bug
DistroRelease: Ubuntu 25.10
Package: rust-coreutils 0.2.2-0ubuntu2.1
ProcVersionSignature: Ubuntu 6.17.0-29.29-generic 6.17.13
Uname: Linux 6.17.0-29-generic x86_64
ApportVersion: 2.33.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Mon May 18 02:11:34 2026
InstallationDate: Installed on 2024-05-15 (733 days ago)
InstallationMedia: Kubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240425.1)
SourcePackage: rust-coreutils
UpgradeStatus: Upgraded to questing on 2025-10-27 (203 days ago)

** Affects: rust-coreutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug questing wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152867

Title:
  chown from rust-coreutils does not set the default/login group

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2152867/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to