Greetings All,
When I connect through ftp client using passive mode it gets stuck while
transferring data file.  It says about to open data connection and then it
gets stuck.

I find this behavior only in some windows client.  I tested the firewall
passive ports are open (using powershell) and found they are.  From Ubuntu
clients it works fine.  I found this little weird - not sure you have come
across this issue earlier or something obvious that I am missing.  From
FileZilla client (in windows) in works - but when I try custom command (bin
PASV put error-event-log) it gets stuck the same way  with code 150

tried this in ftp mina 1.1.1 and 1.1.4 versions - it is the same issue.
Appreciate any kind of pointers.

config file
<server
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns="http://mina.apache.org/ftpserver/spring/v1";
        xsi:schemaLocation="
           http://mina.apache.org/ftpserver/spring/v1
http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
           "
        id="ftp1" max-logins="500" anon-enabled="false" max-threads="500"
max-login-failures="1240"
        login-failure-delay="1250">
    <!--TODO:specify the local IP in the listerner element too -->
    <listeners>
        <nio-listener name="default" port="3321" local-address="169.46.1.1"
implicit-ssl="false">
            <ssl protocol="TLS">

                <keystore file="/opt/apacheftpserver111/ssl2024/my.jks"
password="mypassword"/>
   </ssl>
            <data-connection>
                <active enabled="true" ip-check="false"
local-address="169.46.1.1"/>
                <passive ports="50100-50150" external-address="169.46.1.1"/>
            </data-connection>
        </nio-listener>
    </listeners>

    <file-user-manager file="./res/conf/users.properties"/>
</server>
Client log
230 User logged in, proceed.
ftp> cd /erreventfiles
---> CWD /erreventfiles
250 Directory changed to /erreventfiles
ftp> bin
---> TYPE I
200 Command TYPE okay.
ftp> quote PASV
---> PASV
227 Entering Passive Mode (169,46,1,1,195,214)
ftp> put error-event-log
---> PORT 192,168,100,12,211,179
200 Command PORT okay.
---> STOR error-event-log
150 File status okay; about to open data connection.

Server log

[INFO] 2025-03-10 19:14:44,839 [testuser] [14.98.63.238] RECEIVED: PASV
[DEBUG] 2025-03-10 19:14:44,845 [testuser] [14.98.63.238] Initiating
passive data connection
[DEBUG] 2025-03-10 19:14:44,846 [testuser] [14.98.63.238] Opening passive
data connection on address "/169.46.1,.1" and port 50134
[DEBUG] 2025-03-10 19:14:44,846 [testuser] [14.98.63.238] Passive data
connection created on address "/169.46.1.1" and port 50134
[ INFO] 2025-03-10 19:14:44,851 [testuser] [14.98.63.238] SENT: 227
Entering Passive Mode (169,46,1,1,195,214)

[ INFO] 2025-03-10 19:14:51,240 [testuser] [14.98.63.238] RECEIVED: PORT
192,168,100,12,211,179
[ INFO] 2025-03-10 19:14:51,244 [testuser] [14.98.63.238] SENT: 200 Command
PORT okay.

[ INFO] 2025-03-10 19:14:51,524 [testuser] [14.98.63.238] RECEIVED: STOR
error-event-log
[DEBUG] 2025-03-10 19:14:51,525 [testuser] [14.98.63.238] Checking
authorization for /erreventfiles/error-event-log
[DEBUG] 2025-03-10 19:14:51,525 [testuser] [14.98.63.238] Checking if file
exists
[DEBUG] 2025-03-10 19:14:51,526 [testuser] [14.98.63.238] Authorized
[DEBUG] 2025-03-10 19:14:51,531 [testuser] [14.98.63.238] Opening active
data connection
[DEBUG] 2025-03-10 19:14:51,532 [testuser] [14.98.63.238] Binding active
data connection to /169.46.1.1:0

Reply via email to