I spent long time looking for a solution, I’ve tried every shared answer on the internet and nothing could solve the issue. It is an issue I was ignoring for years and I never could fix.
Ok, I’ve Plesk installed and I’m not sure if it has some effect on IIS FTP to do the following behavior …
Using Process Monitor tool, and making ftp login request and watching the tool and doing your investigation using this tool, you can get a hint about the REAL reason of the problem.
For me, I found out that IIS FTP was trying to access the ftp folder from a path DIFFERENT than the actual ftp path I’ve set, I do not know why, but maybe Plesk has some effect on this.
The actual ftp path is
C:inetpubvhostszidapp
The path that IIS FTP was trying to access DURING the login process is
C:inetpubvhostsServers7localuserzid_app_ftp_user
I fixed the issue by creating a folder link from ‘actual’ folder path to the path IIS was trying to access — using the tool mklink tool
CMD command
mklink /d C:inetpubvhostsServers7localuserzid_app_ftp_user "C:inetpubvhostszidapp"
I’ve fixed the issue that way, so wen FTP is trying to access the folder from the wrong path, it is now goes to the correct one.
Please note doing folder shortcut wont work for this, you need a link like linux, not a shortcut …
I hope it will help you
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
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
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
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.
asked Oct 14, 2010 at 11:26
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
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
4,3032 gold badges28 silver badges46 bronze badges
answered Jun 10, 2015 at 17:49
ramjet666ramjet666
811 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 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:
- Open the IIS Manager
- Click on the Sites > Default FTP Site settings
- Open FTP IPv4 Address and Domain Restrictions
- Ask Google what is my ip
- Add your public IP address to the allowed list under FTP IPv4 Address and Domain Restrictions
- Open Services from the Start Menu
- Find the Microsoft FTP Service in the Started Services list
- Restart the Microsoft FTP Service
answered Mar 8, 2017 at 23:51
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
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:
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.
answered Feb 22, 2019 at 5:23
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
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
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
FTP errors are annoying as usual.
You want to upload an important file to your website using an FTP client, but it suddenly throws an error. Quite frustrating, sure.
One of these FTP errors is “530 valid hostname is expected“.
At Bobcares, we help server owners resolve such errors as part of our Dedicated Support Services for web hosts.
Today, we’ll discuss the top 2 reasons for this error and how we fix them.
FTP error “530 valid hostname is expected” – Brief explanation
FTP error 530 valid hostname is expected is a common error seen on FTP servers hosted on Windows system. This error occurs when users set up IIS with multiple FTP sites.
So, every time users enter the correct username and password, the system still prompts this error.
FTP error “530 valid hostname is expected” – Causes and Fixes
We now have a basic understanding of this error. Let’s now see the main reasons for this error and how our Dedicated Support Engineers fix them.
1) Incorrect binding in IIS
FTP binding is the combination of IP address, port and virtual hostname. The FTP server uses these details to listen to the requests made to that FTP host. So, wrong binding settings for the website can always break the FTP connection to the server.
We’ve seen many instances where users try to connect to the FTP site using a hostname that’s not configured in the IIS bindings. As a result, the FTP server was unable to identify the FTP host that connects to the server and throws the FTP error 530 valid hostname is expected.
Similarly, another common mistake we see is that customers set up the FTP site to bind to the localhost loopback IP address(127.0.0.1). As a result, the hostname can’t be resolved externally and the connection can be dropped.
How we fix?
Firstly, our Hosting Engineers get the FTP login details from the customer. Further, we check the Binding settings of the domain on the server. If the FTP host is not configured in the bindings, we’ll add the correct binding for that hostname in the IIS settings.
In addition to that, we confirm the IP address specified in the binding configuration is a non loop back address. That is, it should be the server’s public IP address or server’s internal IP address depending on how the server is configured.
[Need a Server Expert to look into your IIS binding settings? Click here, our Server Administrators are online 24/7.]
2) Incorrect username in the FTP client
This error commonly happens when users configure multiple FTP sites on the same IP address. In other words, multiple websites have same the set of IP address, Port number, etc. So, the FTP server can’t determine the exact account for which the user give the FTP credentials.
As a result it throws the FTP error 530 valid hostname is expected.
How we fix?
It’s a usual case that customers need to host multiple domains on the same IP address. So, here our Support Engineers suggest customers use a hostname and user combination in the format ‘hostname|user'(the symbol | separates hostname and user) in the username field of the FTP clients like Filezilla.
For example, consider that a user wants to connect to the FTP host ftp.domain.com with the username testing. Then, you should give the username as ftp.domain.com|testing. Here, the FTP server can easily identify that the FTP client is connecting to the host ftp.domain.com with the username testing.
[And, do you need a Server Expert to look into this error? One of our Support Engineers can fix it for you.]
Conclusion
In short, FTP error 530 valid hostname is expected can occur due to incorrect binding in IIS or wrong username given in the FTP client. Today, we’ve discussed these causes in detail and how our Support Engineers fix these problems.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
SEE SERVER ADMIN PLANS
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
При подключении к ftp-сайту (IIS) ошибка «530 user cannot login in, home directory inaccessible»
Сделал, но при подключении получил ошибку «530 user cannot login in, home directory inaccessible».
Сначала на сервере проверил наличие пользователя ftp_user_00 в оснастке «Управление компьютером/Локальные пользователи». Пользователь присутствует.
Потом стал проверять права доступа на каталоги, — всё нормально, пользователь ftp_user_00 с соответствующими правами в свойствах каталогов есть, а доступа по-прежнему нет.
Добавил в каталог пользователя «Все», — ничего не изменилось.
Залез в групповые политики. Всё, вроде, нормально.
Потом в диспетчере IIS на начальной странице ftp-сайта стал просматривать встроенные возможности начиная с «Проверки подлинности FTP» и далее, пока не открыл «Правила авторизации FTP», а его там нет (пользователя ftp_user_00).
Добавил разрешающее правило для ftp_user_00 на чтение и запись.
Соединение пошло. Вот надо было сразу лезть в «Правила авторизации FTP», а не ковыряться по каталогам. Видимо, когда менял логин (а по сути, — это новый локальный пользователь), то добавил его в оснастке «Управление компьютером/Локальные пользователи», но при этом забыл добавить в «Правила авторизации FTP» на ftp-сайте.
Вывод. Одна из причин (если не первая) ошибки «530 user cannot login in, home directory inaccessible» при подключении к ftp-сайту (IIS), — отсутствие пользователя, под которым идет подключение, в «Правилах авторизации FTP» в Диспетчере служб IIS.