1

I have an FTP site setup with basic anonymous authentication - and it works fine - I can connect and upload/download.

I need to add another site on the same machine but cant have them both on port 21 so I have tried to setup a binding to the hostname (it is in DNS and I can connect to the site via the hostname without the bindings setup - so I know the hostname works correctly).

When I add the binding for the site - I cannot connect to it anymore through Windows Explorer - the error says "Windows cannot access this folder. Make sure you typed the filename correctly and that you have permission... Details - A connection with the server could not be established"

I have read something about virtual hostnames etc but am not quite sure what I need to do to set this up? Meaning Ive tried what the posts said but it still does not work.

I just need anonymous auth with to a couple of different FTP sites on the same box. I guess I could use different ports - but this should be doable on 21 I thought?

2

FTP (the protocol) does not have a concept of name-based virtual hosts. On HTTP this works because of the Host request header (or TLS SNI with HTTPS). There is no such thing on FTP: You connect and then authenticate.

The only thing you can achieve using FTP is user-based “virtual hosts”: Each user can be restricted to a specific folder. This is how IIS does name-based virtual hosts: You login with a specially formatted user name: Hostname|Username

So basically with anonymous FTP this won’t work.

1
  • OK thanks - thats what I was afraid of and thought may be the case - just wanted confirmation. Thanks again – pelagos Mar 29 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.