0

I have had ProFTP 1.3.2 and configured it to run for the same user on different ports with different root directories. Basically, the configuration was:

<VirtualHost ftp.domain.tld>
Port 1
AuthAliasOnly on
UserAlias xxx yyy
DefaultRoot /var/ftp/subdir
</VirtualHost>

<VirtualHost ftp.domain.tld>
Port 2
AuthAliasOnly on
UserAlias xxx yyy
DefaultRoot /var/ftp/subdir/uploads_weather/
</VirtualHost>

I did this because of a limitation of my weather station, which cannot save data into a subdirectory.

I have now installed a new server (Debian Stretch) and it has ProFTP 1.3.5b, but the above configuration does not seem to work any longer. When I log in on port 2, I see the same contents as I do on port 1.

I'd like to avoid having too many different user names. Is it still possible to have a per-port configuration?

  • Yes, it is still possible to have per-port `` configurations. I'd recommend starting ProFTPD with debug logging enabled, _i.e._ `proftpd -nd10`, and see what it reports about possible IP address/port collisions. After that, use the [debug logging](http://www.proftpd.org/docs/howto/Debugging.html) when your FTP clients connect, and see if that provides more clues. – Castaglia Jan 20 '18 at 19:09

1 Answers1

1

Thanks to a comment of Castaglia I could figure out the issue.

I started ProFTPD at a higher log level (proftps -nd10) and I saw the error message

no matching vhost found for ::ffff:192.168.178.36#2, using DefaultServer 'Debian'

This reminded me of the fact that ProFTPd performs an nslookup operation for its virtual hosts. This could not work on my test environment, because it's just a VM, not a reachable machine in the Internet.

I fixed the test environment by adding the IP address and name to /etc/hosts:

192.168.178.36    ftp.domain.tld