Your message dated Sat, 10 Sep 2022 19:36:48 +0000
with message-id <e1ox6hy-001ath...@fasolo.debian.org>
and subject line Bug#1016102: fixed in rsync 3.2.6-1
has caused the Debian Bug report #1016102,
regarding rsync: The --remove-source-files destroys data when source &
destination are the same (data loss!)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1016102: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016102
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: rsync
Version: 3.2.3-4+deb11u1
Severity: critical
Justification: causes serious data loss
X-Debbugs-Cc: debbug.rs...@sideload.33mail.com
I accidentally ran:
$ rsync -va --progress --remove-source-files "$dir_with_many_files"
"$dir_with_many_files"
Due to a typo when using bash history substitution, the source and
destination were both directories and they both named the same
directory.
The expectation is that rsync should detect movement from A to A and
do nothing apart from warning the user that there is nothing to do.
Instead, because of the “--remove-source-files” option, rsync DESTROYS
all the files in "$dir_with_many_files" irrevokably.
There needs to be a safeguard that prevents --remove-source-files from
having effect if:
* Files are not copied to the destination (for any reason)
* The source and destination are the same
I suffered data loss because of this. At the very least, if it’s
really intended for “rsync --remove-source-files $A $A” to effectively
behave like “rm -rf $A/*”, there AT LEAST needs to be a very loud
warning prompting the user for confirmation. But I conjecture that there
never is a legit scenario where “rsync --remove-source-files” simply
destroys files without safely ensuring they exist somewhere in the
end.
-- System Information:
Debian Release: 11.4
APT prefers stable-updates
APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990,
'testing'), (990, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-16-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages rsync depends on:
ii init-system-helpers 1.60
ii libacl1 2.2.53-10
ii libc6 2.31-13+deb11u3
ii liblz4-1 1.9.3-2
ii libpopt0 1.18-2
ii libssl1.1 1.1.1n-0+deb11u3
ii libxxhash0 0.8.0-2
ii libzstd1 1.4.8+dfsg-2.1
ii lsb-base 11.1.0
ii zlib1g 1:1.2.11.dfsg-2+deb11u1
rsync recommends no packages.
Versions of packages rsync suggests:
ii openssh-client 1:8.4p1-5+deb11u1
ii openssh-server 1:8.4p1-5+deb11u1
ii python3 3.9.2-3
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: rsync
Source-Version: 3.2.6-1
Done: Samuel Henrique <samuel...@debian.org>
We believe that the bug you reported is fixed in the latest version of
rsync, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1016...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Samuel Henrique <samuel...@debian.org> (supplier of updated rsync package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 10 Sep 2022 20:03:51 +0100
Source: rsync
Architecture: source
Version: 3.2.6-1
Distribution: unstable
Urgency: medium
Maintainer: Paul Slootman <p...@debian.org>
Changed-By: Samuel Henrique <samuel...@debian.org>
Closes: 1016102
Changes:
rsync (3.2.6-1) unstable; urgency=medium
.
* New upstream version 3.2.6
- Added a safety check that prevents the sender from removing destination
files when a local copy using --remove-source-files has some files that
are shared between the sending & receiving hierarchies, including the
case where the source dir & destination dir are identical
(closes: #1016102)
* Bump Standards-Version to 4.6.1
Checksums-Sha1:
25e02956462480a0479bfe76fe703edc56ea82a4 2276 rsync_3.2.6-1.dsc
9d9ff8042a19a88a4526249085e10f31a5d021b6 1138593 rsync_3.2.6.orig.tar.gz
57a07b657136f4cf0a80ff7a59e1c2adf5160d1d 195 rsync_3.2.6.orig.tar.gz.asc
cd3a3835773b9423390b98696e1c7da684706601 25716 rsync_3.2.6-1.debian.tar.xz
74ffdd5ca9bd8c45454663faac51e38f2694bd70 6951 rsync_3.2.6-1_amd64.buildinfo
Checksums-Sha256:
43c3c49ee10e778cd5b465d435c8c15932ea6292d4cdd21e626f69670f29e223 2276
rsync_3.2.6-1.dsc
fb3365bab27837d41feaf42e967c57bd3a47bc8f10765a3671efd6a3835454d3 1138593
rsync_3.2.6.orig.tar.gz
61ac88cb588b5280b331fad8df9e6baa1e72ca78da779a90a1142af4a7a09b64 195
rsync_3.2.6.orig.tar.gz.asc
0c61a7220f9bcff8ddf7a6166b4231c1576dfaa7e1091a5e8ac4abfa6cbf7a72 25716
rsync_3.2.6-1.debian.tar.xz
a139effe4631955a4cb161140cf3afee709c0475f7dbb63a9134d4f468c1e586 6951
rsync_3.2.6-1_amd64.buildinfo
Files:
c0a32e8db81de040d451bedc36a974e7 2276 net optional rsync_3.2.6-1.dsc
4221fa80ffa59f46df7c18f61cc7e3e0 1138593 net optional rsync_3.2.6.orig.tar.gz
bfb011aa028513881b46fa79984d0086 195 net optional rsync_3.2.6.orig.tar.gz.asc
a6c16d62964f0884910423d05c251621 25716 net optional rsync_3.2.6-1.debian.tar.xz
42c84a52b6e56391a4e8476f1ddc9476 6951 net optional
rsync_3.2.6-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEBdtqg34QX0sdAsVfu6n6rcz7RwcFAmMc4QwACgkQu6n6rcz7
RwcecBAAuGeBzOr8tZmhezi6zLokp+2uRQciD8yZaVBZPbMH02jWWLhzPDic0QAA
ry6nWo4N8vnRvOL/6FG3W9pymJZgTtAgeOdA+KF5uB8r0cJ/TYcNZ9Mx8CkGmGem
xPJfk1WfXV9jY2Wj/YNd5cv1jEWzDcrj1j+ZOebcjeyUIwCp1wwR5o3kQ7Ua2YV1
kSJyolGPH9sVU0ujfGsBsK82khpeBJB7HrFAd5w7zmT6RUM9Gw6/KnwlARQWA8I6
wfny8wu2n9as1QVCT5WyaHDjNXbwvqUCFInpHAk4vzjuVLD+wLzDsEeM8DmXOOyZ
mUE9apTW/7aSdMt5or1fOqNhII+lDxJ2jXOuMhJTLhWK/HW4pqilLDcFhDb+sYkL
R/0jdxa6hO2IPagzys6oC21DU6Ie7iw4TZRifn30POt8xYMvTHQX82NkrLR26tMd
h1GSfaYQjbx+B7KUaGXz0VvfQyZAFtWjs+i9CnNGx8ePtN/BNNG7eX4iQRPtaCum
aD7WHExNrGX2jkQPzJ+GgcdllvdOumGHPJ/7x3IEC+VnNFqMMydK8PAuA3k8cHjD
CQ/8jxppCl8l+RZdyBFzXxa6RP4ft0wuDu1TptQ54w/nhpi7RwQ6J7XeaEMHcQaF
uGcH72hP31iJ8oSdWiSEcEZ3mv4S13kOrCJ3X++n7UTvle61YMA=
=M9ef
-----END PGP SIGNATURE-----
--- End Message ---