{"action":"closed","issue":{"url":"https://api.github.com/repos/lavv17/lftp/issues/232","repository_url":"https://api.github.com/repos/lavv17/lftp","labels_url":"https://api.github.com/repos/lavv17/lftp/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/lavv17/lftp/issues/232/comments","events_url":"https://api.github.com/repos/lavv17/lftp/issues/232/events","html_url":"https://github.com/lavv17/lftp/issues/232","id":150557375,"number":232,"title":"Some remote files ignored when mirroring with `ftp:use-mlsd = true`","user":{"login":"noniq","id":244158,"avatar_url":"https://avatars.githubusercontent.com/u/244158?v=3","gravatar_id":"","url":"https://api.github.com/users/noniq","html_url":"https://github.com/noniq","followers_url":"https://api.github.com/users/noniq/followers","following_url":"https://api.github.com/users/noniq/following{/other_user}","gists_url":"https://api.github.com/users/noniq/gists{/gist_id}","starred_url":"https://api.github.com/users/noniq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noniq/subscriptions","organizations_url":"https://api.github.com/users/noniq/orgs","repos_url":"https://api.github.com/users/noniq/repos","events_url":"https://api.github.com/users/noniq/events{/privacy}","received_events_url":"https://api.github.com/users/noniq/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-23T14:02:36Z","updated_at":"2016-05-11T14:21:16Z","closed_at":"2016-05-11T14:21:16Z","body":"I recently upgraded to 4.7.1 and noticed that some mirror commands (`mirror --delete …`) I use regularly started to show strange behaviour: They insisted on deleting some local files that were still present on the server. E.g. given a (sub)directory of a current WordPress install, mirroring would always delete the local file `class-walker-nav-menu-edit.php`. When I restored the file locally, deleted it from the server and run a reverse mirror command, the file was correctly identified as missing on the server and thus uploaded. But then running the normal mirror command afterwards would again delete the local file.\r\n\r\nAfter several experiments I found out that this seems to be related to `ftp:use-mlsd`. If I turn this setting of, the bug disappears.\r\n\r\nRemote server identifies as `ProFTPD 1.3.3a`. Here’s a debug log (with `ftp:use-mlsd = true`):\r\n\r\n```\r\n---- local cwd is `/var/www/XXXXX'\r\nmirror(0x204a290) enters state INITIAL_STATE\r\n---- dns cache hit\r\n---- attempt number 1 (max_retries=1000)\r\n---- Connecting to XXXXX (XXXXX) port 21\r\nmirror(0x204a290) enters state CHANGING_DIR_SOURCE\r\n<--- 220 ProFTPD 1.3.3a Server (domaintechnik.at server) [XXXXX]\r\n---> FEAT\r\n<--- 211-Features:                              \r\n<---  MDTM\r\n<---  MFMT\r\n<---  TVFS\r\n<---  AUTH TLS\r\n<---  UTF8\r\n<---  MFF modify;UNIX.group;UNIX.mode;\r\n<---  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;\r\n<---  PBSZ\r\n<---  PROT\r\n<---  LANG en-US*\r\n<---  REST STREAM\r\n<---  SIZE\r\n<--- 211 End\r\n---> AUTH TLS\r\n<--- 234 AUTH TLS successful                   \r\n---> LANG\r\nCertificate depth: 2; subject: /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA; issuer: /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA\r\nCertificate depth: 1; subject: /C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA; issuer: /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA\r\nCertificate depth: 0; subject: /CN=*.ssl-gesichert.at; issuer: /C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA\r\nWARNING: Certificate verification: hostname checking disabled\r\n<--- 200 Using default language en_US     \r\ninitialized translation from ANSI_X3.4-1968 to UTF-8\r\ninitialized translation from UTF-8 to ANSI_X3.4-1968//TRANSLIT\r\n---> OPTS UTF8 ON\r\n<--- 200 UTF8 set to on                   \r\n---> OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner\r\n<--- 200 OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;\r\n---> USER XXXXX\r\n<--- 331 Password required for XXXXX \r\n---> PASS XXXX\r\n<--- 230 User XXXXX logged in              \r\n---> PWD\r\n<--- 257 \"/\" is the current directory           \r\n---> PBSZ 0\r\n---- CWD path to be sent is `/wp-admin/includes'\r\n<--- 200 PBSZ 0 successful                          \r\n---> CWD /wp-admin/includes\r\n<--- 250 CWD command successful                     \r\nmirror(0x204a290) enters state CHANGING_DIR_TARGET\r\nmirror(0x204a290) enters state GETTING_LIST_INFO\r\n---> PROT P\r\n<--- 200 Protection set to Private                        \r\n---> EPSV\r\n<--- 229 Entering Extended Passive Mode (|||50030|)       \r\n---- Connecting data socket to (213.145.225.20) port 50030\r\n---- Data connection established                            \r\n0:0 translated to pair 0:0 (0,0)\r\n0 translated to pair 0:0 (0,0)\r\n---> MLSD\r\n<--- 150 Opening ASCII mode data connection for MLSD      \r\ninitialized translation from UTF-8 to ANSI_X3.4-1968//TRANSLIT\r\n0:0 translated to pair 0:0 (0,0)\r\n0 translated to pair 0:0 (0,0)\r\nWARNING: Certificate verification: hostname checking disabled\r\n---- Got EOF on data connection                      \r\n---- Closing data socket\r\n<--- 226 Transfer complete                                   \r\n---> TYPE I\r\n<--- 200 Type set to I                                      \r\nmirror(0x204a290) enters state TARGET_REMOVE_OLD_FIRST\r\nmirror(0x204a290) enters state WAITING_FOR_TRANSFER\r\nmirror(0x204a290) enters state TARGET_REMOVE_OLD\r\nrm file:/var/www/fiv.at/www/wp-admin/includes/class-walker-nav-menu-edit.php\r\nRemoving old file `class-walker-nav-menu-edit.php'\r\nmirror(0x204a290) enters state TARGET_CHMOD\r\nmirror(0x204a290) enters state FINISHING\r\nmirror(0x204a290) enters state DONE\r\nclosed FD 4\r\n---> QUIT\r\n<--- 221 Goodbye.\r\n---- Closing control socket\r\n```\r\n"}}