Unable to log in to a domain via FTP: Cannot log in, home directory inaccessible

Refers to:

  • Plesk for Windows
  • Plesk

Created:

2016-11-16 13:22:39 UTC

Modified:

2017-02-16 20:10:59 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to log in to a domain via FTP: Cannot log in, home directory inaccessible

Symptoms

1) Unable to login under a domain's FTP user:

    Cannot log in, home directory inaccessible

or

    530 User cannot log in, home directory inaccessible.

2) It is not possible to upload files via FTP:

An error occurred copying a file the FTP Server. Make sure you have permission to put files on the server.
Details:
200 Type set to I.
227 Entering Passive Mode(1,2,3,4,5,28).
550 test.html: Access is denied

Cause

There are several possible causes. This error occurs if any of the following are true:

  1. The host name is longer than 15 symbols.

  2. The domain resolves to a different IP than the one configured in Plesk.

  3. The user does not exist in IIS > IP_address > localuser .

  4. IP Address mapping

  5. The user does not have permission to read the home directory. IIS > IP_address > localuser > domain.com > FTP Authorization Rules

  6. The FTP server configuration is broken.

  7. The FTP_ROOT_D path is set incorrectly in HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config .

  8. The incorrect path is specified in IIS. To check the path, open IIS manager > Sites > Right click on <server_ip_address> > Manage FTP Site > Advanced Settings > Physical Path . The path should not include the space sign.

    The correct path should be: C:\\inetpub\\vhosts\\Servers\\8

    alttext

Depending on the version of IIS, the path may differ. For example, in IIS version 6 it will be: IIS 6 > FTP Sites > IP > Properties > Home Directory > Local path . if there is not relevant path specified, correct it so that it redirects to C:\\inetpub\\vhosts\\Servers\\1234

  1. The FTP user link file C:\\inetpub\\vhosts\\Servers\\8\\localuser\\system_user\\domain.tld\\ is missing FTP user permissions.

  2. The FTP user has no access to the home directory ( C:\\inetpub\\vhosts\\domain.tld\\ ) or is not listed in the access list.

  3. The FTP user home directory contains a leading or trailing whitespace ( / httpdocs )

  4. Other possible causes are described in this Microsoft article: "Error message in IIS: "530 User cannot log in. Login failed."

  5. FTP site is missed in IIS.

Resolution

  1. To change the host name, right-click the My Computer icon and choose Properties . Select the Computer Name tab, then click the Change button. Specify the computer name as desired and click OK . When you are done, restart your computer.

  2. Check that domain.tld resolves to the same IP it has been configured for in Plesk. You can use the following command:

    nslookup domain.tld

    The IP that is returned should be the same as the one configured in Plesk for the domain.If your server is behind NAT , you should use the internal IP address that forwarded to external in NAT rules.

    If the name of your server is shorter than 15 symbols and the domain resolves to the proper IP, it could mean something is broken in the FTP configuration. Follow the steps below to rebuild your FTP server configuration:

  3. Make sure that ftp user exists in IIS > IP_address > localuser . If it doesn't exist reconfigure ftp according to step 5.

  4. Check that the user is able to read the contents of the home directory. IIS manager > Sites > Right click on <server_ip_address> > Manage FTP Site > Advanced Settings > Physical Path

    alttext

    If not, reconfigure the FTP site using the instructions in the next step.

  5. For Plesk 8 and Plesk 9 only: Repair permissions on the home folders of the problem domain. This can be done using the Control Panel: go to Domains , mark the problem domain, and click on Check permissions .

    Reconfigure the FTP configuration.

    Before FTP recofigure make sure that main domain of subscription is active.

    • For Plesk 11.0 and earlier: Use the Plesk command line tool ftpmng.exe as follows:

      "%plesk_bin%\\ftpmng.exe" --remove-vhost --vhost-name=domain.tld    
      "%plesk_bin%\\ftpmng.exe" --reconfigure-vhost --vhost-name=domain.tld
    • For Plesk 11.5: Use the utility repair.exe as follows:

      "%plesk_cli%\\repair.exe" --reconfigure-ftp-site -webspace-name domain.tld

    If this issue occurs with every domain, you can repair the FTP configuration for all domains using the following commands:

    • For Plesk 11.0 and earlier: Use the Plesk command line tool ftpmng.exe as follows:

      "%plesk_bin%\\ftpmng.exe" --remove-all
      "%plesk_bin%\\ftpmng.exe" --reconfigure-all
    • For Plesk 11.5 and Plesk 12 Use the utility repair.exe as follows:

      "%plesk_cli%\\repair.exe" --repair-webspace-security -webspace-name domain.tld
    • For Plesk 12.5.30 Use the utility repair :

      plesk repair ftp

      or to repair all errors without confirmation:

      plesk repair ftp -y

    Note: The above commands will not affect website functionality (HTTP/HTTPS). However, any custom FTP configuration will vanish.

  6. Open Registry Editor ( Start > Run > regedit ), navigate to HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config , check the FTP_ROOT_D path and verify it corresponds to the existing physical directory.

  7. Check the physical path for FTP sites in IIS > Web sites > IP address > Basic settings > Physical Path. This should be part of FTP_ROOT_D from the previous step.

  8. Verify that the system user folder (FTP user) of a subscription exists in the FTP site path ( see Cause ). For example, C:\\inetpub\\vhosts\\Servers\\8\\localuser\\system_user\\domain.tld\\ . If it does not, find a folder which contains this folder, for example C:\\inetpub\\vhosts\\Servers\\7\\ , and change the Physical Path accordingly.

  9. Verify that the FTP user link file C:\\inetpub\\vhosts\\Servers\\8\\localuser\\system_user\\domain.tld\\ has Read&Execute permission for the FTP user (system_user).

  10. Verify that FTP site exist: IIS > servername > sites > IP address . If this site doesn't exist, go to Plesk > Tools & Settings > IP Addresses > Reread IP .

If you have encountered issues with FTP access on a Linux Plesk Server, the following article could be useful:

My server is behind a firewall; how do I configure a passive ports range for ProFTPd?

Have more questions? Submit a request
Please sign in to leave a comment.