Search code examples
javaftpftp-clientapache-commons-net

How can i get the settings value of the FTP server through java code?


I want to know the setting value of the FTP server from the client state.

(using FTPClinet, Apache Commons-Net library)

for example

among the setting value of the FTP server

idle_session_timeout=300
pasv_enable=YES

I want to get the above FTP server setting value through FTPClient in Java(apache commons-net)

Is it possible to obtain the setting value of the FTP server from the client state?


Solution

  • There's no generic way to retrieve arbitrary settings of an arbitrary FTP server from a client side.

    There might be specific ways to detect (not read) specific settings, but that will differ per settings. So you will have to ask specific question for each setting you are interested in. If you do that, make sure you explain, why you even want to know the value of the setting.


    Though, you have asked the question about the active/passive mode already:
    Is there a way to tell if the FTP server is active or passive in the Java web program?
    (albeit under a different account)