Hello,
        There is a bug in lftp mirror command. If a nonempty directory X on a 
serwer is removed and then replaced with a symlink, lftp attempts to remove a 
local copy of X with 'rmdir', which fails with ENOTEMPTY.
        The fix is obvious.
        Sample transcript at the end of the message. The (current) version 
2.5.1 is also affected.
        BTW, 2.3.8 required external "rm" binary; is it true as well in case
of 2.5.1 ?

Save yourself,
Nergal
    
owl!root:~# lftp --version
Lftp | Version 2.3.8 | Copyright (c) 1996-2001 Alexander V. Lukyanov
This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.
Send bug reports and questions to <[EMAIL PROTECTED]>.
owl!root:~# lftp -c 'o 10.0.0.1 && mirror pub -v --delete'
Retrieving remote file `somedir/somefile'
owl!root:~# ls -alR pub
pub:
total 4
drwxr-xr-x    4 root     root         1024 May 11 07:42 .
drwx------   10 root     root         1024 May 11 07:42 ..
drwxr-xr-x    2 root     root         1024 May 11  2002 somedir
drwxr-xr-x    2 root     root         1024 May 11  2002 someotherdir

pub/somedir:
total 2
drwxr-xr-x    2 root     root         1024 May 11  2002 .
drwxr-xr-x    4 root     root         1024 May 11 07:42 ..
-rw-r--r--    1 root     root            0 May 11  2002 somefile

pub/someotherdir:
total 2
drwxr-xr-x    2 root     root         1024 May 11  2002 .
drwxr-xr-x    4 root     root         1024 May 11 07:42 ..

Now, on 10.0.0.1, we remove ~ftp/pub/somedir and make it a symlink to
someotherdir (rm -fr ~ftp/pub/somedir; ln -s someotherdir
~ftp/pub/somedir). Subsequent mirroring fails:

owl!root:~# lftp -c 'o 10.0.0.1 && mirror pub -v --delete'
Removing old local file `somedir'
mirror: remove(/root/pub/somedir): Directory not empty
owl!root:~# ls -alR pub
pub:
total 4
drwxr-xr-x    4 root     root         1024 May 11 07:42 .
drwx------   10 root     root         1024 May 11 07:42 ..
drwxr-xr-x    2 root     root         1024 May 11  2002 somedir
drwxr-xr-x    2 root     root         1024 May 11  2002 someotherdir

pub/somedir:
total 2
drwxr-xr-x    2 root     root         1024 May 11  2002 .
drwxr-xr-x    4 root     root         1024 May 11 07:42 ..
-rw-r--r--    1 root     root            0 May 11  2002 somefile

pub/someotherdir:
total 2
drwxr-xr-x    2 root     root         1024 May 11  2002 .
drwxr-xr-x    4 root     root         1024 May 11 07:42 ..


Reply via email to