[Bug 2130465] Re: cp commands fails when process is in deleted directory
Gordon Lack
2130465 at bugs.launchpad.net
Tue Dec 2 11:08:40 UTC 2025
Sorry!
I posted a link to the wrong issue on the coreutils git.
The actual issue is:
https://github.com/uutils/coreutils/issues/9105
which has a fix posted against it (https://github.com/uutils/coreutils/pull/9249).
[The 9116 issues I mentioned is actually against install, for which a
fix has been posted recently too]
--
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:
Unknown
Status in rust-coreutils package in Ubuntu:
Triaged
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