Ftp error 530 user cannot log in

While trying to connect to your FTP server hosted by IIS, you may run into “530 User cannot log in, home directory inaccessible” error. This error occurs whether you are using anonymous access or basic authentication.   A sample connection log from an FTP client:   530 User cannot log in, home dire...

While trying to connect to your FTP server hosted by IIS, you may run into “530 User cannot log in, home directory inaccessible” error. This error occurs whether you are using anonymous access or basic authentication.

A sample connection log from an FTP client:

530 User cannot log in, home directory inaccessible.
Critical error: Could not connect to server

post16.png

This issue may appear as “Failed to retrieve directory listing” or “Home directory inaccessible” error as well.

Depending on the FTP client, you may not see the detailed error message right away. For instance, when I tried to connect to the same site with the same configuration by using WinSCP, I received “Access Denied” error. If your FTP client doesn’t show the entire connection history, look for the log folder to get more information about the root cause.

Solution

There might be a few reasons for running into this error. Here are the most common root causes and their solutions:

  • The user may not be have access to the home directory. Go to “IIS > FTP site > FTP User Isolation”. Select the directory that your users can access. More information about User Isolation settings
  • IIS may not be configured to use passive mode FTP. There are two types of FTP connections: Active mode and passive mode. In active mode, the client opens a port. The server connects to this port for transferring data. In passive mode, the server opens a port. The client connects to this port to transfer data. In order to use passive mode, enter a port range and IP address in “IIS > Server name > FTP Firewall Support” page

ftp-user-isolation-home-directory.png

passive-mode.png

Note: You can configure your FTP client to use only the active mode if you don’t want to turn on passive mode

Less common reasons for 530 error

The items below may cause “530 User cannot log in, home directory inaccessible” as well.

  • Authorization rules. Make sure to have an Authorization rule that allows the user or anonymous access. Check “IIS > FTP site > FTP Authorization Rules” page to allow or deny access for certain or all users.
  • NTFS permissions. The FTP users (local or domain users) should have permissions on the physical folder. Right click the folder and go to Properties. In the Security tab, make sure the user has required permissions. You can ignore Shared tab. It is not used for FTP access. 
  • Locked account. If you local or domain account is locked or expired, you may end up seeing “User cannot log in” error. Check local user properties or Active Directory user settings to make sure the user account is active. 
  • Other permission issues. The user account may not have “Log on locally” or “Allow only anonymous connections security” rights. 

If you are still seeing the issue, check IIS and FTP logs (c:inetpublogsLogFilesFTPSVC2) but don’t let it mislead you. IIS logs sometimes may show PASS. It doesn’t mean everything is well. It’s better to check FTP logs that IIS records for FTP connections

iis-ftp-logs.png

Note: In a case with “Connection closed by the server” error for FTP connection, we determined the root cause as the corruption of system files occurred during in-place server upgrade.

I’ve been tasked with setting up an FTP directory for a client of ours. I’m working from a Windows 2008 Server with IIS 7 installed.

To create the FTP user directory I’ve followed this eHow tutorial.

The FTP site is already set up on IIS 7, so I skipped that bit and followed the rest exactly. However, when I try to connect via FileZilla, I get the following errors:

Status: Connecting to xxx.xx.xx.xx:21...
Status: Connection established, waiting for welcome message...
Response: 220 Microsoft FTP Service
Command: USER userFTP
Response: 331 Password required for userFTP.
Command: PASS ********
Response: 530 User cannot log in, home directory inaccessible.
Error: Critical error
Error: Could not connect to server

I’ve double checked the permissions of the user and everything appears to be as it should. If anyone has any advice, I’d be so grateful.

Michael Lowman's user avatar

asked Oct 14, 2010 at 11:26

109221793's user avatar

4

It’s not clear to me from reading your post and the link you provided as to whether or not you’re using user isolation. My suggestion would be to determine whether or not you want to use user isolation or not and then start from scratch.

Here’s a link that may help:

http://learn.iis.net/page.aspx/305/configuring-ftp-75-user-isolation/

answered Oct 14, 2010 at 12:39

joeqwerty's user avatar

joeqwertyjoeqwerty

109k6 gold badges80 silver badges171 bronze badges

3

I just hit this issue and for anyone googling the error would like to add the solution that worked on Windows Server 2012 IIS 8.0. It was very simple in the end you have to create a LocalUser folder in the FTP root you specified when creating the FTP site. Then create your username folders under this folder.

For e.g. D:ftp-rootLocalUseruser1

sebix's user avatar

sebix

4,2632 gold badges26 silver badges45 bronze badges

answered Jun 10, 2015 at 17:49

ramjet666's user avatar

ramjet666ramjet666

711 silver badge2 bronze badges

0

It is the user isolation setting.

You will need change it to «do not isolate users, start users in «user name directory» «

answered Jun 6, 2014 at 4:28

cherry Jee's user avatar

cherry Jeecherry Jee

611 silver badge1 bronze badge

1

Another cause of this error can be the use of FTP IPv4 Address and Domain Restrictions.

If your IIS FTP Site, or one of its parents including the Default site, is using IPv4 Address Restrictions then you’ll need to ensure that your IP address is allowed.

I had this same issue you’ve described, with the exact same Error returned to FileZilla. Here’s how I fixed it:

  1. Open the IIS Manager
  2. Click on the Sites > Default FTP Site settings
  3. Open FTP IPv4 Address and Domain Restrictions
  4. Ask Google what is my ip
  5. Add your public IP address to the allowed list under FTP IPv4 Address and Domain Restrictions
  6. Open Services from the Start Menu
  7. Find the Microsoft FTP Service in the Started Services list
  8. Restart the Microsoft FTP Service

IIS Manager FTP IPv4 Address and Domain Restrictions

answered Mar 8, 2017 at 23:51

Christopher's user avatar

We had the same issue . (530 user cannot log in, home directory inaccessible)The problem was a new opening (To allow more sessions) in our firewall allowed another IP to our FTP server (We have IP restrictions setup)
Solution was to add the IP to the IPRestrictions ALLOW LIST

answered Jan 28, 2020 at 18:04

Mark Anderson's user avatar

Check the FTP logs recorded by IIS. The status and sub-status codes will give you more information about the issue. Here is a list of the status codes: The FTP status codes in IIS 7.0 and later versions

In my case, this issue occured because my IIS wasn’t configured for passive mode. After entering a port range and external IP address in FTP Firewall Support feature, the error message disappeared:

enter image description here

In this blog post, it mentions a few more root causes: 530 User cannot log in, home directory inaccessible

Authorization rules. Make sure to have an Authorization rule that allows the user or anonymous access. Check “IIS > FTP site > FTP Authorization Rules” page to allow or deny access for certain or all users.

NTFS permissions. The FTP users (local or domain users) should have permissions on the physical folder. Right click the folder and go to Properties. In the Security tab, make sure the user has required permissions. You can ignore Shared tab. It is not used for FTP access.

Locked account. If you local or domain account is locked or expired, you may end up seeing “User cannot log in” error. Check local user properties or Active Directory user settings to make sure the user account is active.

Other permission issues. The user account may not have “Log on locally” or “Allow only anonymous connections security” rights.

Community's user avatar

answered Feb 22, 2019 at 5:23

Ned's user avatar

I had the exact same issue as the OP after adding a new user and associated user folder to an existing FTPS site. The solution in the end was simply to restart the site in IIS. After that I could connect with the new user account successfully.

answered Sep 29, 2021 at 9:21

Philip Stratford's user avatar

Adding the following to this excellent source of unusual things that need to be checked:

When using ‘User name directory (disable global virtual directories)’ with local computer accounts The first folder in the FTP site should be ‘LocalUser’, this however experiences a problem when the machine has a computer name longer than 15 characters.

If that is the case:
Rename LocalUser to the first 15 characters of the computer name. Not sure if basic auth also had to be alerted to set the default domain as the same string, would be great if someone could test and revert.

PS: I was a little perplexed, when first setting this up, but with user isolation enabled (disabled global virtual directories) the FTP site’s first directory (LocalUser or the first 15 chars of the computer name, when longer) can either be a physical directory or a virtual directory, goes without saying that this is true for the username directories as well (no length limit on these).

answered Feb 5 at 11:54

David Herselman's user avatar

You will need to verify the Physical Path of the FTP. Following is the steps to check.

Go to IIS.

Right, Click on Default FTP site. Manage FTP Sit >> Advance

Settings >> Physical Path.

It must be correct or you will find home directory inaccessible.

answered Dec 18, 2017 at 14:01

Hiren Parghi's user avatar

  • Remove From My Forums
  • Question

  • I have FTP issue on windows server 2012. Error when login to ftp server.

    Password:
    530 User cannot log in.
    Login failed.

    This error appear when i enable FTP user Isolation -> Isolate users. Restrict user to the following directory -> Username disrectory (disable global virtual dirictory).

    Please help. Thanks

Answers

  • Hi,

    Firstly, please make sure that the user account has permissions to log in. 

    In addition, if you configure FTP user isolation using the
    User name directory (disable global virtual directories) option, all FTP user sessions are restricted to the virtual or physical directory with the same name of the FTP user account, and all global virtual directories will be ignored.
    All virtual directories must be defined explicitly under a user’s physical or virtual home directory path.

    Which user account you have used to log in? Please make sure that you have created a physical or virtual directory for the user account that will access your FTP site.

    Although the link below is for Windows Server 2208 R2, it would be similar on Windows server 2012:

    FTP User Isolation Page

    Besides, it seems that the question is more related to IIS, I also recommend you to ask in IIS forum for professional assistance:

    http://forums.iis.net/

    Best regards,

    Susie

    • Marked as answer by

      Monday, July 14, 2014 6:23 AM

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Ftp directory listing of current dir 1 timeout error occurred
  • Ftp connection error
  • Ftp 500 error
  • Ftp 331 error
  • Ftk has encountered an error and must close for the king

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии