Correction. I can reproduce when using VSFTPd on a Linux machine I set up just for this reason and PHP 7. I'm not sure if it's a bug in VSFTPd or PHP itself but there's nothing I can do about it. The transfer wizard asks PHP to see if there is a file wordpress/index.php. That's a
read operation using
ftp_fget. For some reason and empty folder is created(!) during that read only operation.
I believe that's a bug in VSFTPd of PHP because VSFTPd's log file states the following:
Tue Dec 19 11:21:08 2017 [pid 7071] CONNECT: Client "::ffff:127.0.0.1"
Tue Dec 19 11:21:08 2017 [pid 7070] [nicholas] OK LOGIN: Client "::ffff:127.0.0.1"
Tue Dec 19 11:21:08 2017 [pid 7072] [nicholas] FAIL DOWNLOAD: Client "::ffff:127.0.0.1", "/path/to/site/index.php
", 0.00Kbyte/sec
Tue Dec 19 11:21:08 2017 [pid 7074] CONNECT: Client "::ffff:127.0.0.1"
Tue Dec 19 11:21:08 2017 [pid 7073] [nicholas] OK LOGIN: Client "::ffff:127.0.0.1"
Tue Dec 19 11:21:08 2017 [pid 7075] [nicholas] FAIL DOWNLOAD: Client "::ffff:127.0.0.1", "/path/to/site/wordpress
/index.php", 0.00Kbyte/sec
Tue Dec 19 11:21:08 2017 [pid 7077] CONNECT: Client "::ffff:127.0.0.1"
Tue Dec 19 11:21:08 2017 [pid 7076] [nicholas] OK LOGIN: Client "::ffff:127.0.0.1"
Tue Dec 19 11:21:09 2017 [pid 7078] [nicholas] OK UPLOAD: Client "::ffff:127.0.0.1", "/path/to/site/akeeba-16.png
", 265 bytes, 429.17Kbyte/sec
There is no write operation logged anywhere. There is no other instance of "wordpress" anywhere else in the log. I double checked, right after the ftp_fget (a read only operation) we get the empty folder. I cannot reproduce it using the ftp command line client. I also can't seem to be able to reproduce this on a live site.
A "fix" for that would be the removal of the check for WordPress but I'm not sure it's the right way to do it. I added that check to make sure you're not trying to overwrite a WordPress site with a Joomla! site which is a surprisingly common mistake that can lead to an insecure site (since the leftover WordPress installation will never be updated).
So, well done, you found a bug between PHP and VSFTPd :D
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!