There are three common causes of this error:
1. If you encounter an 'Empty directory' error message during the Capture Your Code step of the website addition process, there is a good chance that your FTP/SFTP user does not have access to your website files or that your website files are not in your FTP/SFTP user's home directory.
Frequently, when adding an FTP/SFTP user to your hosting account a new, empty folder is created as their home directory. So, if you encounter an 'Empty directory' error message during the Capture Your Code step of the website addition process, the first step is to check that the FTP/SFTP user has access to your website files. The home directory for an FTP/SFTP user may be visible within your host's control panel. If not, please contact your hosting provider, server administrator or web developer to confirm that the user you provided to CodeGuard has access to the content you would like to back up.
2. It is also possible that your web content is stored outside of your FTP/SFTP user's home directory and that your user's home directory can not be changed. If that is the case, you can follow the steps in the How do I back up files not in my FTP/SFTP user's home directory? article to work around this limitation.
3. Finally, it is possible that your SFTP/FTP server or firewall is not configured to allow a data connection to be opened. In addition to port 21, passive FTP also requires additional ports for data transfer. This range of ports (usually something like 50000-50100) will be specified in your FTP server configuration and will need to be added to your firewall. Similarly, the host address or IP configured in the SFTP/FTP server must be the external IP address of your server. If the external address is not specified, the server will instruct us to try and open a data connection back to the internal IP address (10.x.x.x, 192.x.x.x or 172.x.x.x) which we are not able to do.