Page 1 of 1

FTP problem when deleting files

Posted: 31 Oct 2020, 13:18
by CobQA
When deleting a FTP directory, hidden files are not deleted. What can I do?

Re: FTP problem when deleting files

Posted: 31 Oct 2020, 13:21
by cobian
The problem is: to be able to delete a directory, the program must recursively delete all files and subdirectories present on the remote site. In order to do this, the program requests a list of files. Some servers can be configured to send the hidden files as well, but some others don't do that. In that case, the program will delete all other files, but not the hidden ones, and of course, the parent directory will not be deleted. Check if with your FTP server allows to send hidden files when a list command is received. For example, Proftpd can be configured to send hidden files in a listing: File : /etc/proftpd/proftpd.conf Modification : ListOptions "-1" replace by ListOptions "-A" #List all files except "." and ".."

In version 10 or 11, you can add a parameter to force the server to send you the listing with all hidden files. Again, the server must support this.