The File Transfer Protocol (FTP) is a standard network protocol that transfers computer files from one host to another over a TCP-based network. FTP is built on Client-Server Architecture and uses separate connections for control and data.
FTP client connects with the FTP server with a standard username and Password information called FTP Login details. Following is a complete flow of the FTP client-server connection establishment process.
- The FTP client sends a DNS query for the domain name to get the FTP server IP address (if you use ftp.domain.com as the FTP hostname).
- DNS responds back with the IP address.
- FTP client and server complete the three-way handshake process.
- The FTP server then sends a 220 response to indicate that the FTP server is ready to accept a login.
- The FTP client sends a username through the USER command and a password through the PASS command.
- The FTP server verifies the provided login information.
- The FTP server will send a welcome message if the provided login details are correct.
- The FTP client requests a directory listing.
- The FTP server transfers the requested listing.
After specifying the FTP credentials, if the FTP user does not have the required privileges, you may receive the following error message in the FTP client:
Status: Resolving address of ftp.xxxxx.com
Status: Connecting to xxx.xxx.xxx.xx:21...
Status: Connection established, waiting for welcome message...>
Response: 220 Microsoft FTP Service
Command: USER Administrator
Response: 331 Password required for Administrator.
Command: PASS ***************
Response: 530 User cannot log in, home directory inaccessible.
Error: Critical error
Error: Could not connect to server
In most cases, this error occurs only when FTP authorization rules for the default FTP site are not set.
How to fix this error by changing FTP authorization rules?
- Log in to the VPS via a Remote Desktop connection as an Administrator User.
Please refer to How to connect windows VPS using RDP for more details.
- Open IIS
[Start → Administrative Tools → Internet Information Service].
- Expand the Sites option from the left pane.
4. You will see a Default FTP Site in the site list; expand this website.
5. Now, double-click on the FTP Authorization Rules option from the center pane.
6. From the right pane, click on Add Allow Rule.
7. Select the All Users option, and tick the check box for the Read and Write permission.
8. Click on the OK button to save the changes and Restart Microsoft FTP Services to reflect them.
Follow the below-mentioned steps to restart Microsoft FTP Services –
- Open Services [Start → Run → type services.msc and press Enter].
- Select Microsoft FTP Service.
- Click on the Restart link from the left pane option.
Now, try to log in again to the FTP account.
If everything goes fine, you should not receive any error while connecting to your FTP account.
The FTP accounts should be created with appropriate permissions to avoid such errors.
We have linked the article to set up the FTP account from IIS.
→ Looking for any other help with FTP?
Don't forget to check out our Complete FTP Guide.
→ Are you facing an FTP error at FileZilla?
Please refer to the Fix FTP error for more details.
→ Are you facing an FTP with too many connection errors?
Please refer to Fix FTP for too many clients error for more details.