FTP Server Settings

FTP Server Settings

FTP Server Settings is a tool to refer or modify the settings related to FTP server and SFTP server.

Functions provided by FTP Server Settings

FTP Server Settings provides the following functions.
Description of Functions
Name of functions Tab Description Remarks
FTP server connection settings FTP server settings Make the settings of FTP Server.
  • This is administrative function and can only be performed by administrators.
SFTP server connection settings SFTP server settings Make the settings of SFTP Server
  • This is administrative function and can only be performed by administrators.
Start FTP Server Boot and Shutdown Start FTP server.
  • This is administrative function and can only be performed by administrators.
Restart FTP Server Restart FTP server.
  • This is administrative function and can only be performed by administrators.
Stop FTP Server Stop FTP server.
  • This is administrative function and can only be performed by administrators.
Start SFTP server Start SFTP server
  • This is administrative function and can only be performed by administrators.
  • To start SFTP server, host key needs to be allocated in advance. For how to allocate host key, refer to "Host key".
Restart SFTP server Restart SFTP server
  • This is administrative function and can only be performed by administrators.
  • To start SFTP server, host key needs to be allocated in advance. For how to allocate host key, refer to "Host key".
Stop SFTP server Stop SFTP server
  • This is administrative function and can only be performed by administrators.

FTP server connection settings

This is administrative function and can only be performed by administrators.
Changes of FTP server settings are reflected after the FTP server is restarted.
If any invalid value is entered in FTP server settings, the entered value will not be reflected even after [OK] or [Apply] button is pressed.
Description of items
Item name Description Remarks
Start FTP Server on DataSpiderServer Start Select whether to start FTP server when starting DataSpiderServer.
  • [Checked]:
    Start FTP server when starting DataSpiderServer
  • [Not Checked]: (default)
    Do not start FTP server when starting DataSpiderServer.
  • Check this item when using FTP trigger right after starting DataSpiderServer.
Port number Enter the port number that FTP server uses.
  • The port number that can be entered is 1 to 65535.
  • The default value is "21".
Active mode port number Enter the port number to use when data transfer mode is active mode.
  • The port number that can be entered is 1 to 65535.
Passive mode port number Enter the port number to use when data transfer mode is passive mode.
  • [Automatic allocation]: (default)
    Randomly assign available port number.
  • [Specify range]
    Randomly assign available port number from the specified range.
  • The port number that can be entered is 1 to 65535.
Idle time out Enter the time to destroy session when inactive state that no FTP command or data transfer being executed continues.
  • The unit is "second".
  • The default value is "300" seconds.
  • Value that can be entered is 0 to 2147483647.
  • Unlimited if 0 is entered.
Maximum login number Specify the maximum number that can login to FTP server.
  • The default value is "10".
  • Value that can be entered is 0 to 2147483647.
  • Unlimited if 0 is entered.
  • The number also includes the anonymous user.
Allow anonymous login Select whether to allow anonymous login.
  • [Checked]:
    Allow anonymous login.
  • [Not Checked]: (default)
    Do not allow anonymous login.
  • anonymous user's password is empty.
Maximum anonymous login number Enter the maximum number that can login to FTP server.
  • Enabled if [Allow anonymous login] is [Checked].
  • The default value is "10".
  • Value that can be entered is 0 to 2147483647.
  • If "0" is entered, anonymous users can not login.

SFTP server connection settings

This is administrative function and can only be performed by administrators.
Changes of SFTP server settings are reflected after the SFTP server is restarted.
If any invalid value is entered in SFTP server settings, the entered value will not be reflected even after [OK] or [Apply] button is pressed.
Description of items
Item name Description Remarks
Start SFTP Server on DataSpiderServer Start Select whether to start SFTP server when starting DataSpiderServer.
  • [Checked]:
    Start SFTP server when starting DataSpiderServer
  • [Not Checked]: (default)
    Do not start SFTP server when starting DataSpiderServer.
  • Check this item when using FTP trigger right after starting DataSpiderServer.
Port number Enter the port number that SFTP server uses.
  • The port number that can be entered is 1 to 65535.
  • The default value is "7722".
Idle time out Enter the time to destroy session when inactive state that no SFTP command or data transfer being executed continues.
  • The unit is "second".
  • The default value is "300" seconds.
  • Value that can be entered is 0 to 2147483647.
  • Unlimited if 0 is entered.
Maximum login number Specify the maximum number that can login to SFTP server.
  • The default value is "10".
  • Value that can be entered is 0 to 2147483647.
  • Unlimited if 0 is entered.
Passphrase of the host key Enter the Passphrase of the host key.
  • When a pass phrase is not set to a host key, it is not necessary to specify [Passphrase of the host key].
Allow login with password Select whether to allow login with password.
  • [Checked]:
    Allow login with password.
  • [Not Checked](default)
    Do not allow login with password.
  • If you uncheck the [Allow login with password], you can log in only by public key authentication.

Start FTP Server

This is administrative function and can only be performed by administrators.
Property Action
Item name Description Remarks
Start FTP Server Start FTP server.
  • Disabled when [Status] is "Running".
  • When FTP is started, the [Status] will be shown as "Running".

Restart FTP Server

This is administrative function and can only be performed by administrators.
Property Action
Item name Description Remarks
Restart FTP Server Restart FTP server.
  • Disabled when [Status] is "Stopped".
  • When FTP is started, the [Status] will be shown as "Running".

Stop FTP Server

This is administrative function and can only be performed by administrators.
Property Action
Item name Description Remarks
Stop FTP Server Stop FTP server.
  • Disabled when [Status] is "Stopped".
  • When FTP is stopped, the [Status] will be shown as "Stopped".

Start SFTP server

This is administrative function and can only be performed by administrators.
To start SFTP server, host key needs to be allocated in advance. For how to allocate host key, refer to "Host key".
Property Action
Item name Description Remarks
Start SFTP Server Start SFTP server.
  • Disabled when [Status] is "Running".
  • When SFTP is started, the [Status] will be shown as "Running".

Restart SFTP server

This is administrative function and can only be performed by administrators.
To start SFTP server, host key needs to be allocated in advance. For how to allocate host key, refer to "Host key".
Property Action
Item name Description Remarks
Restart SFTP Server Restart SFTP server.
  • Disabled when [Status] is "Stopped".
  • When SFTP is started, the [Status] will be shown as "Running".

Stop SFTP server

This is administrative function and can only be performed by administrators.
Property Action
Item name Description Remarks
Stop SFTP Server Stop SFTP server
  • Disabled when [Status] is "Stopped".
  • When SFTP is stopped, the [Status] will be shown as "Stopped".

FTP User

FTP User Home Directories

Commands available in FTP server

Commands available in FTP server are listed below.It is also available to connect from a FTP client supporting those commands to the FTP server and operate.
It is not available in SFTP server.

Command Description Command Response Remarks
ABOR Stop all currently executing data transfer.
  • 226 ABOR command successful.
 
APPE Adds data to send to server to the specified file.If the file does not exist, create a new file.
  • 501 Syntax error.
  • 550 Not a plain file.
  • 550 Permission denied.
  • 150 File status okay; about to open data connection.
  • 425 Cannot open data connection.
  • 426 Data connection error.
  • 551 Error on output file.
  • 226 Transfer complete.
  • PORT command or PASV command needs to be executed in advance.
CDUP Use the directory of 1 layer up as current directory.
  • 250 Directory changed to <name of the destination directory>
  • 550 No such directory.
 
CWD User the specified directory as the current directory.
  • 250 Directory changed to <name of the destination directory>
  • 550 No such directory.
  • When directory name is omitted, use FTP root directory ("/").
DELE Delete the specified file.
  • 250 Command okay.
  • 450 No permission to delete.
  • 450 Can't delete file.
  • 550 Not a valid file.
  • 501 Syntax error in parameters or arguments.
 
HELP Show the list of executable FTP commands.
  • 214 <help>
 
LIST Gets a list of files in the working directory.If a directory name is specified, gets the file list of the directory.If a file name is specified, gets the current information of the file.
  • 150 File status okay; about to open data connection.
  • 425 Cannot open data connection.
  • 426 Data connection error.
  • 551 File listing failed.
  • 501 Syntax error.
  • 226 Closing data connection.
  • PORT command or PASV command needs to be executed in advance.
MDTM Gets the update date of the specified directory or file.
  • 501 Syntax error.
  • 550 File unavailable.
  • 213 <Timestamp>
  • The time get by MDTM command is in GMT Standard Time.
MKD Creates the specified directory.
  • 501 Syntax error.
  • 550 Not a valid file.
  • 550 Already exists.
  • 550 No permission.
  • 257 <directory name> created.
  • 550 Cannot create directory.
  • An absolute path or a relative path from the working directory can be specified.
MLSD Gets the detail of file list in the working directory.If a directory name is specified, gets the detail of the file list of the directory.
  • 150 File status okay; about to open data connection.
  • 226 Closing data connection.
  • 425 Can't open data connection.
  • 426 Data connection error.
  • 501 Syntax error in parameters or arguments.
  • 551 File listing failed.
 
MODE Sets data transfer mode.
  • S
    Perform stream transfer.
  • Z
    Perform ZIP compressed transfer.
  • 501 Syntax error.
  • 504 Not implemented for this command.
  • 200 Command okay.
 
NLST Gets a list of files in the working directory.If a directory name is specified, gets the file list of the directory.
  • 150 File status okay; about to open data connection.
  • 425 Cannot open data connection.
  • 426 Data connection error.
  • 551 File listing failed.
  • 501 Syntax error.
  • 226 Closing data connection.
  • Only the file name is get.
NOOP This command does not affect settings or the previously entered commands.The FTP server only returns OK.
  • 200 Command NOOP okay.
 
PASS Specifies the FTP user's password.
  • 501 Syntax error.
  • 503 Login with USER first.
  • 202 Already logged-in.
  • 421 Maximum anonymous login limit has been reached.
  • 421 Maximum login limit has been reached.
  • 530 Authentication failed.
  • 230 User logged in, proceed.
  • Executes immediately after the USER command.
PASV Sets the data transfer mode of FTP server as passive mode.
  • 425 Cannot open passive connection.
  • 227 Entering passive mode (<h1,h2,h3,h4,p1,p2>)
 
PORT Specifies the host and port in order to specify the data port to use in data connection.
  • 501 Syntax error.
  • 510 Syntax error in parameters.
  • 510 Port is disabled.
  • 553 Host unknown.
  • 510 PORT IP mismatch.
  • 552 Invalid port number.
  • 200 Command PORT okay.
  • The argument is the combination of the 32 bit Internet host address and the 16 bit TCP port address.This address information is broken down into regions of 8 bit each, and each region is transferred in decimal (string representation), the regions are separated by comma (,).

    Example: PORT h1, h2, h3, h4, p1, p2
    h1 is the first 8 bits of the Internet host address.
PWD Displays the current working directory.
  • 257 "<directory name>" is current directory
 
QUIT Log out from the FTP server.
  • 221 Goodbye.
 
REIN Flush all the input/output/account information except for until the executing file transfer is finished.This means the same state as right after a user opens the control connection.
  • 220 Service ready for new user.
 
REST Resumes file transfer from the specified marker.
  • 501 Syntax error.
  • 501 Not a valid number.
  • 501 Marker cannot be negative.
  • 350 Restarting at <location of the markers>. Send STORE or RETRIEVE to initiate transfer.
 
RETR Gets the specified file from FTP server.
  • 501 Syntax error.
  • 550 No such file or directory.
  • 550 Not a plain file.
  • 550 Permission denied.
  • 150 File status okay; about to open data connection.
  • 425 Cannot open the data connection.
  • 426 Data connection error.
  • 551 Error on input file.
  • 226 Transfer complete.
 
RMD Removes the specified directory from FTP server.
  • 501 Syntax error.
  • 550 No permission.
  • 550 Not a valid directory.
  • 250 <directory name> removed.
  • 550 Cannot remove directory.
  • An absolute path or a relative path from the working directory can be specified.
RNFR Rename the specified file.Specify the original file name.
  • 501 Syntax error.
  • 550 File unavailable.
  • 350 Requested file action pending further information.
  • To change the file name, RNTO needs to be executed right after executing this command.
RNTO Executes right after RNFR to change the name of the specified file.Specify the new file name.
  • 501 Syntax error.
  • 503 Can't find the file which has to be renamed.
  • 553 Not a valid file name.
  • 553 No permission.
  • 250 Requested file action okay, file renamed.
  • 553 Cannot rename file.
 
SITE Executes the specific custom command of FTP server.Custom commands are as follows.
  • DESCUSER
    Displays information of the specified user.
  • HELP
    View a summary of custom commands.
  • STAT
    Displays the FTP server statistics.
  • WHO
    Displays users connecting to the FTP server.
  • ZONE
    Displays the time zone.
  • 200 Command SITE okay.
  • 502 Command SITE not implemented for this argument.
  • 500 Execution failed.
  • 530 Access denied.
  • The following commands can only be executed by root user.
    • DESCUSER
    • STAT
    • WHO
SIZE Gets the file size of the specified file.
  • 501 Syntax error.
  • 550 No such file or directory.
  • 550 Not a plain file.
  • 213 <file size>
 
STAT Displays the information of current FTP server status and transfer status.
  • 211 Statistics information.
 
STOR Transfer data to FTP server in the specified file name.Overwrites if a file with the same name already exists.
  • 501 Syntax error.
  • 550 Invalid path.
  • 550 Permission denied.
  • 150 File status okay; about to open data connection.
  • 425 Cannot open the data connection.
  • 426 Data connection error.
  • 551 Error on output file.
  • 226 Transfer complete.
 
STOU Same as STOR, transfers data to FTP server in the specified file name, but if a file with the same name exists, automatically assign a different name to the new file to avoid overwriting.
  • 550 Unique file name error.
  • 550 Permission denied.
  • 150 File status okay; about to open data connection.
  • 425 Cannot open the data connection.
  • 250 <filename> Transfer started.
  • 426 Data connection error.
  • 551 Error on output file.
  • 226 Transfer complete.
 
STRU Specifies the structure of file transfer.
  • F
    Transfer the file in file structure.
  • 501 Syntax error.
  • 504 Command not implemented.
  • 200 Command STRU okay.
 
SYST Displays the system name of FTP server.
  • 215 UNIX Type: Apache FtpServer
  • The system name shown in SYST command is "UNIX Type: Apache FtpServer".
TYPE Specifies the format of the data transfer.
  • A
    Transfer in ASCII mode.
  • I
    Transfer in binary mode.
  • 501 Syntax error.
  • 504 Command not implemented.
  • 200 Command TYPE okay.
 
USER Log in with the specified user name.
  • 501 Syntax error.
  • 230 Already logged-in.
  • 530 Invalid user name.
  • 530 Anonymous connection is not allowed.
  • 421 Maximum anonymous login limit has been reached.
  • 421 Maximum login limit has been reached.
  • 331 Guest login okay, send your complete e-mail address as password.
  • 331 User name okay, need password.
  • With USER command, the user will be prompted for a password even if the entered user name does not exist.

SFTP server environment setting

Host key

Host key is required to use SFTP server Generate Host key and allocate in advance.

Generating Host key

For details on generating Host key, refer to "Generating SSH private key and public key".

Allocation of Host key

  1. Stop SFTP server.
  2. Allocate the generated private key to $DATASPIDER_HOME\server\system\common\classes directory with file name "ssh_host_key".
  3. Start SFTP server.
Allocating public key is not required.

Client private key and public key

To login to SFTP server with public key authentication, private key and public key are required to each client connecting to SFTP server. Generate private key and public key in advance and register client public key to SFTP server.
Following steps are not required if public key authentication is not being used.

Generating client private key and public key

For generating client private key and public key, refer to "Generating SSH private key and public key".

Allocating client private key

Allocate client private key to any directory connecting to SFTP server, and set private key to SFTP client.
For details on how to set client private key to SFTP client, refer to the using SFTP client document.

Registering client public key

  1. A directory ".ssh" is generated in the directory /ftp/<FTP user name>.

  2. A file "authorized_keys" is generated in the directory /ftp/<FTP user name>/.ssh.

  3. Open authorized_keys file, and save after pasting public key contents.
Restarting SFTP server after registering client public key is not required.

SFTP server authentication method

Authentication method supported in SFTP server is as follows. Enable to connect to SFTPserver from the below SFTP client supporting authentication method.

Specification Limits

Main exceptions

Exception name Cause Solution
IllegalArgumentException
port out of range
Port number specified is outside the valid range. Please check the port number entered in [Port number] or [Passive mode port number].
IllegalArgumentException
Illegal idle time
Idle timeout value is incorrect. Please check the value entered in [Idle time out].
SocketTimeoutException
Accept timed out
Possible idle timeout in data transfer. Please check whether the set data connection port is allowed on FTP client side and FTP server side.
ConnectException
Connection refused: connect
Data connection may not be created. Please check whether the set data connection port is allowed on FTP client side and FTP server side.
SocketException
Connection reset
The data connection may be closed during data transfer. Please check whether the data is readable or writable.
MalformedInputException
Input length = 1 (Hexdump: 54 53 4F 20 52 2F ...)
The specified file name encoding may be other than UTF-8 on FTP client side. Please check whether the specified file name encoding is UTF-8 on FTP client side.
FtpServerConfigurationException
Failed to bind to address 0.0.0.0/0.0.0.0: <port>, check configuration
The specified port number of FTP server is not available. Please check whether the specified port number of FTP server is already used, if it is a well-known port, check whether the well-known port is available.
BindException
Permission denied
The specified data connection port number cannot be used without permission. Please check whether the root permission of the OS is granted to the user of OS that started DataSpiderServer.
SftpServerBootException
Host key is not located.
SFTP server host key is not allocated. Allocate SFTP server host key.
SftpServerBootException
Passphrase of the host key does not correspond.
Passphrase set in SFTP server host key and value entered in [Passphrase of the host key] do not match. Check value entered in [Passphrase of the host key].
SftpServerBootException
Failed to read host key.
Cannot read SFTP server host key. Make host key available to read such as checking host key access authorization, checking whether host key is created with OpenSSH format regenerating by modifying host key encryption method.
SftpServerBootException
Failed to start SFTP server.
Failed to start SFTP server by reasons not above. Make SFTP server enable to launch by restarting SFTP or modifying [Port number].

Notes