[Bug 2130465] Re: cp commands fails when process is in deleted directory
Launchpad Bug Tracker
2130465 at bugs.launchpad.net
Sat Sep 12 20:25:50 UTC 2026
This bug was fixed in the package rust-coreutils - 0.10.0-1ubuntu3
---------------
rust-coreutils (0.10.0-1ubuntu3) stonking; urgency=medium
[ Simon Johnsson ]
* d/p/cp-fix-umask-permission-denied.patch: Fix an issue where cp would fail
with "Permission denied" if umask masked the owner's write permission
(LP: #2164777).
[ Varun Varma ]
* d/p/cp-stop-resolving-cwd.patch: cp: avoid resolving cwd
for absolute recursive copies (LP: #2130465).
* Fix Lintian warnings.
rust-coreutils (0.10.0-1ubuntu2) stonking; urgency=medium
* d/p/cp-fix-symlink-target-permissions.patch: Fix an issue where cp
would alter the permissions of the source file, such as stripping the
setuid bit (LP: #2165041)
rust-coreutils (0.10.0-1ubuntu1) stonking; urgency=medium
[ Simon Johnsson ]
* Merge with Debian unstable. Remaining changes: (LP: #2163175)
- Install libstdbuf.so: Modify d/rules to export LIBSTDBUF_DIR as to not
skip stdbuf, fix libstdbuf.so permissions, and install it in
rust-coreutils.install.
- Install hardlinks: Rename rust-coreutils.links to
rust-coreutils.hardlinks.
- Enable feat_systemd_logind: This allows commands such as who and pinky
to work correctly. Introduces libsystemd-dev as a dependency.
- Remove Build-Depends on lld: Debian added it as the preferred linker,
but some partial architectures like i386 may be missing it.
- d/rules: Fix vendored sources field creation. Debian does not have
access to dh-cargo-vendored-sources so it uses a script instead.
Change it to use dh-cargo-vendored-sources on Ubuntu instead.
- d/rules: Skip failing tests.
- Add patches:
+ build-stty
+ dd-ensure-full-writes
+ require-utility-to-be-invoked-at-matching-path
+ Tweak-release-build-profile
+ rust-vendor/glibc-2.42
+ rustix-use-libc-backend
- Remove upstream patches:
+ fix-ppc64el-baudrate.diff: Launchpad's builders instead fails on
ppc64le for this patch, the original source code is correct.
- Update vendored rust crates
- debian/control: Update XS-Vendored-Sources-Rust field
* Drop changes:
- Remove patches fixed upstream:
+ cp-respect-composite-flag
+ fix-cp-parents
+ fix-incomplete-locale-bundles
+ fix-locale-path: Debian adopted this patch.
* New changes:
- debian/patches/remove-workspace-members.patch: Remove workspace member
array to prevent dh-cargo bypassing workspace-exclude.patch. Otherwise
vendored dependencies would still think that they're part of the
workspace.
* Fixes:
- File ownership changes when a file is mv'ed by root to a different file
system (LP: #2134860)
- Failing to build images: mv resolv.conf.tmp
/build/chroot/etc/resolv.conf mv: File exists (os error 17)
(LP: #2159679)
- unaligned plus in "ls -l" output (LP: #2132368)
- git-buildpackage ftbfs on resolute-proposed due to rust coreutils
(LP: #2137580)
- env: signal flags do not understand RTMIN+n notation (LP: #2142900)
- date: width prefix in %N format specifier is ignored
( %3N, %6N always output full 9 nanosecond digits) (LP: #2150342)
- changes in behaviour of cp in coreutils-from-uutils break test case in
util-linux (LP: #2157011)
- systemd: TEST-45-TIMEDATE is flaky with rust coreutils (LP: #2157342)
[ Varun Varma ]
* debian/patches/df-statfs-fallback.patch: Add a fallback to statfs if the
mount path could not be found normally (LP: #2116290).
-- Varun Varma <varun.varma at canonical.com> Tue, 01 Sep 2026 12:04:54
-0400
** Changed in: rust-coreutils (Ubuntu)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/2130465
Title:
cp commands fails when process is in deleted directory
Status in rust-coreutils:
Fix Released
Status in rust-coreutils package in Ubuntu:
Fix Released
Bug description:
If the current directory of a process is deleted and the process runs
the Rust cp command it will faile with:
/usr/lib/cargo/bin/coreutils/cp: failed to get current directory No
such file or directory (os error 2)
The GNU version of cp does not have this issue.
As a result, some automated build processes (which arrive at this
situation) now fail to run.
You can see the error by using this simple shell script:
====================
#!/bin/sh
#
echo Rust core-utils
cd $HOME
mkdir -p cu-test-base
touch cu-test-base/file1 cu-test-base/file2
mkdir -p cu-test
cd cu-test
rm -rf $HOME/cu-test
/usr/lib/cargo/bin/coreutils/cp -r $HOME/cu-test-base $HOME/cu-test
ls $HOME/cu-test
#####################
echo GNU core-utils
cd $HOME
mkdir -p cu-test-base
touch cu-test-base/file1 cu-test-base/file2
mkdir -p cu-test
cd cu-test
rm -rf $HOME/cu-test
/usr/bin/gnucp -r $HOME/cu-test-base $HOME/cu-test
ls $HOME/cu-test
====================
ProblemType: Bug
DistroRelease: Ubuntu 25.10
Package: rust-coreutils 0.2.2-0ubuntu2.1
ProcVersionSignature: Ubuntu 6.17.0-6.6-generic 6.17.1
Uname: Linux 6.17.0-6-generic x86_64
ApportVersion: 2.33.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Fri Oct 31 21:48:09 2025
InstallationDate: Installed on 2024-10-12 (384 days ago)
InstallationMedia: Kubuntu 24.10 "Oracular Oriole" - Release amd64 (20241007.6)
SourcePackage: rust-coreutils
UpgradeStatus: Upgraded to questing on 2025-10-13 (18 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/rust-coreutils/+bug/2130465/+subscriptions
More information about the foundations-bugs
mailing list