Hi everyone,

First off, I'd like to apologize for this post that might seem kinda
general, but I am truly clueless. I have:

I have the most basic setup one may think of, being just a small
modification of ftpd-full.xml, deactivating active mode and setting up
MySQL as a user manager (which definitely works, as I can create a user
with the command line class!) and using another port.

Starting FtpServer, it only logs the config file used and "FtpServer
started", nothing further. Now, I am able to connect to the server.
Terminal ftp client states it's connected, is apparently stuck, though, not
taking any commands, FileZilla reports it's connected, yet waiting for a
welcome message.

I have tried:

* Using JDK 11 and JDK 17
* Changing the user data - This seems to do nothing, so apparently it's not
checked
* Connecting from the server itself and from outside

And could not come up with a solution. Could anybody here please help me?


The config file is 1. attached to this email, 2. available here:
https://pastebin.com/raw/MFXsCB9w
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://mina.apache.org/ftpserver/spring/v1";
  xmlns:beans="http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
     http://mina.apache.org/ftpserver/spring/v1 https://mina.apache.org/ftpserver-project/ftpserver-1.0.xsd
     "
  id="KrassFTP" anon-enabled="false" max-login-failures="3">

  <listeners>
    <nio-listener name="default" port="2222" implicit-ssl="true"
      idle-timeout="600">
        <ssl>
            <keystore file="res/aaa.jks" password="---" />
        </ssl>
      <data-connection idle-timeout="60" implicit-ssl="true">
        <!--<active enabled="false" local-address="1.2.3.4" local-port="2323" ip-check="true" /> -->
        <passive ports="2323"/>
      </data-connection>
    </nio-listener>
  </listeners>

<db-user-manager encrypt-passwords="salted">
<data-source>
    <beans:bean class="org.apache.commons.dbcp2.BasicDataSource">
        <beans:property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
        <beans:property name="url" value="jdbc:mysql://localhost/ftp" />
        <beans:property name="username" value="apacheftp" />
              <beans:property name="password" value="aass" />
    </beans:bean>
</data-source>

<insert-user>INSERT INTO FTP_USER (userid, userpassword,
      homedirectory, enableflag, writepermission, idletime, uploadrate,
      downloadrate) VALUES ('{userid}', '{userpassword}',
      '{homedirectory}',
      {enableflag}, {writepermission}, {idletime},
      {uploadrate},
      {downloadrate})
    </insert-user>
      <update-user>UPDATE FTP_USER SET
        userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag={enableflag},writepermission={writepermission},idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate}
        WHERE userid='{userid}'
    </update-user>
      <delete-user>DELETE FROM FTP_USER WHERE userid = '{userid}'
    </delete-user>
      <select-user>SELECT userid, userpassword, homedirectory,
        enableflag, writepermission, idletime, uploadrate, downloadrate,
        maxloginnumber, maxloginperip FROM
        FTP_USER WHERE userid = '{userid}'
    </select-user>
      <select-all-users>SELECT userid FROM FTP_USER ORDER BY userid
    </select-all-users>
      <is-admin>SELECT userid FROM FTP_USER WHERE userid='{userid}'
        AND
        userid='admin'
    </is-admin>
      <authenticate>SELECT userpassword from FTP_USER WHERE
        userid='{userid}'</authenticate>
  </db-user-manager>
</server>

Reply via email to