Меню

530 valid hostname is expected ошибка

I’ve configured IIS to have multiple FTP sites, using the instructions found here: https://docs.microsoft.com/en-us/iis/publish/using-the-ftp-service/using-ftp-virtual-host-names-in-iis-7

See the configuration I ended up with below.

In IIS I’ve configured basic authentication and use user mysite_ftp for ‘Connect as’, when testing settings I get green checkmarks on both Authenication and Authorization.

IIS settings:
enter image description here

When I use Filezilla to try to connect I get this logging:

Tried with VPS hostname: h2746286.stratoserver.net

Status: Resolving address of h2746286.stratoserver.net
Status: Connecting to 85.214.200.30:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command:    USER tv_ftp
Response:   331 Valid hostname is expected.
Command:    PASS ***********
Response:   503 Login with USER first.
Error:  Critical error: Could not connect to server

Tried with hostname: www.telefonievergelijken.nl

Status: Resolving address of www.telefonievergelijken.nl
Status: Connecting to 85.214.200.30:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command:    USER tv_ftp
Response:   331 Valid hostname is expected.
Command:    PASS ***********
Response:   503 Login with USER first.
Error:  Critical error: Could not connect to server

Tried with hostname: ftp.telefonievergelijken.nl

Status: Resolving address of ftp.telefonievergelijken.nl
Status: Connecting to 85.214.200.30:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command:    USER tv_ftp
Response:   331 Valid hostname is expected.
Command:    PASS ***********
Response:   503 Login with USER first.
Error:  Critical error: Could not connect to server

applicationHost.config

<sectionGroup name="system.ftpServer">
    <section name="log" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
    <section name="firewallSupport" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
    <section name="caching" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
    <section name="providerDefinitions" overrideModeDefault="Deny" />
    <sectionGroup name="security">
        <section name="ipSecurity" overrideModeDefault="Deny" />
        <section name="requestFiltering" overrideModeDefault="Deny" />
        <section name="authorization" overrideModeDefault="Deny" />
        <section name="authentication" overrideModeDefault="Deny" />
    </sectionGroup>
    <section name="serverRuntime" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
</sectionGroup>

<sites>
    <site name="othersite" id="2">
        <application path="/" applicationPool=".NET v4.5">
            <virtualDirectory path="/" physicalPath="E:othersitewwwroot" userName="othersite_web" password="[enc:IISCngProvider:b1dn9+We00KRNWUB6shbPm/hLtBOF2hOG9We5zVgaEmYL5C/fDLxDc3QH9Rnvi79SjeM+Rauk/bQWEBzJnw=:enc]" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:80:www.othersite.nl" />
            <binding protocol="http" bindingInformation="*:80:othersite.nl" />
        </bindings>
    </site>
    <site name="telefonievergelijken" id="3">
        <application path="/" applicationPool=".NET v4.5">
            <virtualDirectory path="/" physicalPath="E:telefonievergelijkenwwwroot" userName="tv_web" password="[enc:IISCngProvider:x+PhGwZweUwR53tUgGTdEGui8k4gIJRASehxKVtsPoTtxNIA8aRe8WUwvdLuEdzSQicrJVDwen7e/C6x9qfiFyudqtZYwhXuo=:enc]" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:80:www.telefonievergelijken.nl" />
            <binding protocol="http" bindingInformation="*:80:telefonievergelijken.nl" />
        </bindings>
        <traceFailedRequestsLogging enabled="true" directory="E:IISDataLogFilesFailedReqLogFiles" />
    </site>
    <site name="FTP-othersite" id="1">
        <application path="/">
            <virtualDirectory path="/" physicalPath="E:othersitewwwroot" />
        </application>
        <bindings>
            <binding protocol="ftp" bindingInformation="127.0.0.1:21:" />
        </bindings>
        <ftpServer>
            <security>
                <ssl controlChannelPolicy="SslAllow" dataChannelPolicy="SslAllow" />
                <authentication>
                    <basicAuthentication enabled="true" />
                </authentication>
            </security>
        </ftpServer>
    </site>
    <site name="FTP-TV" id="4">
        <application path="/">
            <virtualDirectory path="/" physicalPath="E:telefonievergelijkenwwwroot" userName="tv_ftp" password="[enc:IISCngProvider:xYxqamuKq02/xUcvZGTdEGui8gh3w6XT0hEegnCMZbVIxeWIOypRIZ1u8UAOG/AJg=:enc]" />
        </application>
        <bindings>
            <binding protocol="ftp" bindingInformation="127.0.0.1:21:www.telefonievergelijken.nl" />
        </bindings>
        <ftpServer>
            <security>
                <ssl controlChannelPolicy="SslAllow" dataChannelPolicy="SslAllow" />
                <authentication>
                    <basicAuthentication enabled="true" />
                </authentication>
            </security>
        </ftpServer>
    </site>
    <siteDefaults>
        <logFile logFormat="W3C" directory="E:IISDataLogFiles" />
        <traceFailedRequestsLogging directory="E:IISDataLogFilesFailedReqLogFiles" />
        <ftpServer>
            <logFile directory="E:IISDataLogFilesFTPLogs" />
            <security>
                <authentication>
                    <basicAuthentication enabled="false" />
                </authentication>
            </security>
        </ftpServer>
    </siteDefaults>
    <applicationDefaults applicationPool="DefaultAppPool" />
    <virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>        

UPDATE 1

Ah, I’ve changed the 127.0.0.1 IP address to my VPS’s external IP address. When I try to connect with ftp.telefonievergelijken.nl|tv_ftp I get logging errors:

Error:  Could not connect to server
Status: Waiting to retry...
Status: Resolving address of ftp.telefonievergelijken.nl|tv_ftp
Status: Connection attempt failed with "EAI_NONAME - Neither nodename nor servname provided, or not known".

UPDATE 2

Changed username settings for connection:
enter image description here

User-1017055418 posted

 I created ftp site with this options:

Anonymous Authentication = Disable

Basic  Authentication=Enable

 Add Allow Rule(specified user:Administrator:Read,Write)

Allow SSL connection

Require SSL certificate:Not selected

bindings: ??.??.??.??:21:ftp.??example??.com(ftp)

add permissions for user ‘administrator’ on physical path.

 add ‘ftp’ alias(CName) on ‘??example??.com’ zone in DNS.(so I can ping and trace rout ‘ftp.??example??.com’ from internet)

I try to test my ftp site from cmd and that was OK,I wrote

 FTP ??.??.??.??

 User (??.??.??.??:(none)): ftp.??example??.com|Administrator

331 Password Required for ftp.??example??.com|Administrator.

Password: ******

230 User logged in.

FTP>

but when I test ftp with windows and wrote ‘ftp.??example??.com’ in address bar, can’t connect and said
Valid Host name expected. I Use fireftp (firefox addon) and this error shown:

 530-Valid hostname is expected.
 Win32 error:   No such host is known.
 Error details: Hostname didn’t match any configured ftp site.
530 End

I remove virtual host name from my binding and everything is OK????!!!!!

 bindings: ??.??.??.??:21: (ftp)

I want to use virtual host name because I want to create multiple FTP sites on a single IP address by using the default port(21):

Any idea?

Moderator: Project members

jerelo

500 Syntax error
Posts: 15
Joined: 2011-03-16 21:41
First name: Jeff
Last name: Leese

530 Valid hostname is expected.

#1

Post

by jerelo » 2011-10-16 22:31

Hi, I’m hoping to correspond with someone who might be familiar with the filezilla client connecting to IIS ftp. According to the screenshot, I get the error «530 Valid hostname is expected.».

Any ideas on where to look to create the configuration that the client is expecting and not finding?

In IIS, I have a ftp site with the binding «ftp.example.com», using a certificate.
Since the client finds this site, (when offsite) it seems to have and respond to the binding (hostname). So why is it getting this problem, so late in the connection process….

thanks for help in getting this configured correctly…

Attachments
host name needed.PNG
host name needed.PNG (12.99 KiB) Viewed 54724 times


User avatar

botg

Site Admin
Posts: 34713
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: 530 Valid hostname is expected.

#2

Post

by botg » 2011-10-17 05:58

Broken server, FTP does not have a concept of hostnames.


jerelo

500 Syntax error
Posts: 15
Joined: 2011-03-16 21:41
First name: Jeff
Last name: Leese

Re: 530 Valid hostname is expected.

#3

Post

by jerelo » 2011-10-17 18:16

botg wrote:Broken server, FTP does not have a concept of hostnames.

If it doesn’t have the concept of hostname, then it doesn’t make sense that it would reference a hostname error, as though it was expecting something and it wasn’t received.

We can agree that something is broken. The server however, seems to be working normally. Perhaps it’s in the ftp configuration that something is misconfigured.


User avatar

botg

Site Admin
Posts: 34713
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: 530 Valid hostname is expected.

#4

Post

by botg » 2011-10-17 18:23

Please contact the server administrator and inquire that command the server expects and the RFC that specifies that command.


jerelo

500 Syntax error
Posts: 15
Joined: 2011-03-16 21:41
First name: Jeff
Last name: Leese

Re: 530 Valid hostname is expected.

#5

Post

by jerelo » 2011-10-17 20:02

Ok, I’m the administrator, and you’ve suggested that I can ask myself,
1) the command the server expects
and 2) the RFC (Request for Comments).

The command, according to the log is USER.
Ok, great, that’s progress, you’ve helped me identify the step based on the command.
So, when USER is invoked I should expect a series of actions, and maybe I could identify these by consulting a document that is used to describe standards for the ftp protocol.

Have I understood correctly? It’s sounding like I should need to focus on the server’s response to the USER command. I’ll review logs eventually, and see what it turns up. Thanks.


User avatar

boco

Contributor
Posts: 26431
Joined: 2006-05-01 03:28
Location: Germany

Re: 530 Valid hostname is expected.

#6

Post

by boco » 2011-10-18 02:52

Normally, after the USER command is sent, the server should request the account’s password to complete the login process. But it looks like you have IIS 7 with that FTP Hosts headers? Then you should read that topic: http://forum.filezilla-project.org/view … =2&t=22032.

The FTP hosts headers mechanism is not valid FTP and thus not supported by FileZilla. So you’d need to disable this on the server.

### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###


jerelo

500 Syntax error
Posts: 15
Joined: 2011-03-16 21:41
First name: Jeff
Last name: Leese

Re: 530 Valid hostname is expected.

#7

Post

by jerelo » 2011-10-18 18:20

Thanks Boco,
I’d be happy to turn host headers off, but after looking through the iis ftp settings, it isn’t clear how I could do this. (I also looked at the link you gave, but it just confirms that host headers isn’t supported).

Would you mind giving some guidance on where (within the iis 7.5 ftp site settings) I would turn off the host headers?

Also, since I’m new to this, are there any general comments you could share about the consequences of turning this off? Will I have to adjust anything else, after turning this off? In my case its a very basic function I need: 2 users need to ftp in using one site.

thanks, and I think this direction will likely help many other users.


jerelo

500 Syntax error
Posts: 15
Joined: 2011-03-16 21:41
First name: Jeff
Last name: Leese

Re: 530 Valid hostname is expected.

#8

Post

by jerelo » 2011-10-18 18:56

I tried removing the hostname (under bindings for the ftp site), and this did allow it to pass by the USER command. So now filezilla can supply the password, but it runs into a problem when it tries to access the user’s home directory.

530 User cannot log in, home directory inaccessible.

I tried the various settings in IIS under «ftp user isolation» but all generate the same error. I set a virtual directory for the ftp site (giving it my user credentials to access the directory I want).

Can anyone give me some settings that are known to work? or explain what is the issue here. I never know if the problem is with the server configuration or a limitation in filezilla, so guidance for a working set of configuration settings would be very helpful. Thanks!


User avatar

botg

Site Admin
Posts: 34713
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: 530 Valid hostname is expected.

#9

Post

by botg » 2011-10-19 06:14

Please contact Microsoft to get support for IIS.


Seht

500 Command not understood
Posts: 1
Joined: 2011-11-22 17:25

Re: 530 Valid hostname is expected.

#10

Post

by Seht » 2011-11-22 17:37

I’m a month too late to the party, but I just had the same problem and have a resolution for you.

First problem:

530 Valid hostname is expected.

IIS is a royal pain in the ass.

When you apply a binding to the FTP site you must also specify it in the ftp client when you login. So if your binding was configured as ftp.carsgozoom.com then your login should be ftp.carsgozoom.com|administrator.

Second problem:

530 User cannot log in, home directory inaccessible.

IIS is still a pain in the ass.

You’re logged in but it doesn’t know where to go. Well, it does know where to go but the directory doesn’t exist. In your FTP root create a directory called LocalUser and put your username in there (FTProot/LocalUser/Administrator).

I hope this helps someone.


mvezoli@adinet.com.uy

500 Command not understood
Posts: 1
Joined: 2018-11-12 20:13
First name: Martín
Last name: V

Re: 530 Valid hostname is expected.

#11

Post

by mvezoli@adinet.com.uy » 2018-11-12 20:18

Also for 530 User cannot log in, home directory inaccessible there’s another way of solving it.

In IIS Manager go to ftp site then ftp Authorization Rules and create an allow rule specifying the user (eg. Administrator) and check read & Write permissions.


User avatar

boco

Contributor
Posts: 26431
Joined: 2006-05-01 03:28
Location: Germany

Re: 530 Valid hostname is expected.

#12

Post

by boco » 2018-11-12 23:31

Thank you, but you DID realize that you posted into a seven years old topic?

### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###


IoTChris

500 Command not understood
Posts: 1
Joined: 2019-02-25 22:03
First name: Chris
Last name: Schaller

Re: 530 Valid hostname is expected.

#13

Post

by IoTChris » 2019-02-27 00:12

Seht wrote: ↑

2011-11-22 17:37



When you apply a binding to the FTP site you must also specify it in the ftp client when you login. So if your binding was configured as ftp.carsgozoom.com then your login should be ftp.carsgozoom.com|administrator.

You my friend were a legend back in 2011 with your response and are still rocking it in 2019! Yes this is an old post, but the information is still relevant in Windows Server 2016.

I have 22 sites (and counting) running in my small IIS farm, everything MUST run on host headers, I just simply cannot manage that many individual port routes.

I’m using FTP for deployment of sites mainly.
The trick, as mentioned, is that the domain used as the user domain MUST match the hostheader, DO NOT use the AD Domain name for your user, instead use the format {hostheader}|{username} and to set the default domain on the basic authentication configuration for the FTP site.


FTP-Error-Valid-Hostname-Is-Expected

04
Mar

Windows Server

When connecting to IIS7 ( Internet Information Server – the default web server for windows servers ) using FTP you get the following error.

Response: 530 Valid hostname is expected.
Error: Could not connect to server

Reason

When you set up name-based FTP services IIS7 wants the site name defined with the username so that IIS7 can associate the username with the site they wish to log in to.

If you are having more than one FTP site on your VPS you will need to access FTP via following method.

Host: Mydomain.com
User: Mydomain.com|Username

Note the “|” that separates the Site name and the Username.

OR you remove the “Host Name” defined in the “Bindings” property of the FTP site.

cpanel-server-20off

Author

Inder

Founder & CEO of 24x7servermanagement.com with 20 years of experience in Cloud Infrastructure, Managed IT Services and Systems Administration. Certified AWS Cloud Associate Engineer.


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

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

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • 5276435 ошибка адаптивного освещения тигуан
  • 5260 ошибка мерседес w221