Closed
Description
Warning: This will delete local content on the server you are running the commands from
- Create a directory called
foobar/file:on any FTP server - Run an lftp reverse mirror command with
--deletetowards this server, wherefoobar/file:does not exist on the local source. - Watch as lftp deletes the cwd on the sourceserver. If you run the lftp command in
/asroot, that means the entire server will be wiped.
Script to reproduce:
mkdir -p /var/tmp/ilovethisdir/
touch ilovethisfile
cd /var/tmp/ilovethisdir/
mkdir -p /var/tmp/lftptest/foobar/
/usr/local/bin/lftp -d -c 'debug 10; set ftp:ssl-allow 0; open -u example.com,"somepassword" example.com; mkdir -p foobar/file:/ls_/'
/usr/local/bin/lftp -d -c 'debug 10; set ftp:ssl-allow 0; open -u example.com,"somepassword" example.com; mirror --verbose=3 --delete --reverse /var/tmp/lftptest /;'
ls -l /var/tmp/ilovethisdir/
From log:
Removing old directory `foobar/file:'
---- local cwd is `/var/tmp/ilovethisdir'
---- remove(/var/tmp/ilovethisdir/.)
**** .: Invalid argument
rm: Access failed: .: Invalid argument
LFTP 4.8.3
Libraries used: Expat 2.0.1, GnuTLS 2.12.23, idn2 2.0.4, Readline 6.0, zlib 1.2.3
Metadata
Metadata
Assignees
Labels
No labels