Hitachi

JP1 Version 12 for UNIX Systems JP1/File Transmission Server/FTP Description, Reference and Operator's Guide


3.1.3 Using environment variables to define a JP1/FTP environment

You can use the OS's environment variables to define some of the JP1/FTP environment settings. The specified settings take effect when you start the JP1/FTP daemon (jftsd) from the environment for which you have set the environment variables. To specify for environment variables to be set when the JP1/FTP daemon automatically starts, define the environment variables in the script that automatically starts the JP1/FTP daemon.

Organization of this subsection

(1) Environment variables that can be set

The following table lists and describes the environment variables that can be set.

Table 3‒2: List of environment variables

Environment variable name

Value

JP1FTS_LS_OPTION

Sets the options of the ls command that are used for the JP1/FTP daemon's response (output) to the LIST command.

Options that can be specified in the ls command (maximum of 32 characters).

The specified options are used.

When omitted:

The following options are used:

In HP-UX: -l

In Solaris: -lg

In AIX: -lA

In Linux: -lA

Note:

You must specify a hyphen (-) immediately before each option.

JP1FTS_LS_LANG#1

Sets the display language of the ls command that is used for the JP1/FTP daemon's response (output) to the LIST command.

Value that can be specified in the LANG environment variable (maximum of 32 characters).

The specified display language is used.

When omitted:

The system uses the display language that is in effect when the JP1/FTP daemon starts.

JP1FTS_AUTO_STDIO

Specifies the standard input/output and error output for an auto-start program (process).

path-name

The specified path name is assigned for the standard input/output and for the error output.

When omitted:

The standard input/output and error output are placed in closed status.

Note:

If the standard input/output and error output cannot be opened, they are placed in closed status.

JP1FTS_AUTO_STDIO_OP

When the destination is to be opened and it is specified by a path name in the environment variable JP1FTS_AUTO_STDIO, JP1FTS_AUTO_STDIO_OP specifies whether the destination will be forced open independent of the process permissions.

ON (specify the character string ON)

The destination is forced open.

When omitted:

The open operation follows the process permissions.

JP1FTS_PRIVILEGE_ADDITION

Specifies that the real user ID of an auto-start program (process) is to be set to 0.#2

ON (specify the character string ON)

The real user ID is set to 0.

In the case of the Linux version, the effective user ID also becomes 0.

When omitted:

The real user ID is adjusted to match the actual user ID.

JP1FTS_LARGEFILE

Sets the maximum size for transmission files at 4 gigabytes minus 1 byte.#3, #4, #7

ON (specify the character string ON)

Enables you to transmit files with a maximum size of 4 gigabytes minus 1 byte.

When omitted:

Files whose size is 2 gigabytes or greater cannot be transmitted.

JP1FTS_LARGEFILE2

Specifies that there is to be no limit on file size for transmission (files with a size of 4 gigabytes or greater are to be allowed). #4, #5, #6, #7

ON (specify the character string ON)

There is no limit to the size of files that can be transmitted. The setting of the JP1FTS_LARGEFILE environment variable is ignored.

When omitted:

The setting of the JP1FTS_LARGEFILE environment variable is effective.

JP1FTS_CONREFUSELOG

Specifies whether to output to the access log the log information on connection requests that were rejected by the function for controlling remote host connections.

ON (specify the character string ON)

Logs of rejected connection requests are output to the access log.

When omitted:

Rejected connection requests are not logged.

JP1FTS_CSUPPLEGROUP

Specifies whether to use the secondary group at the client.

ON (specify the character string ON)

The secondary group is used.

When omitted:

The secondary group is not used.

JP1FTS_WKPORT_ENABLE

Specifies whether connection is to be permitted when a well-known port (0 to 1023) is specified in the PORT command at the FTP server.

ON (specify the character string ON)

Connection to a well-known port is permitted.

When omitted:

Connection to a well-known port is rejected.

JP1FTS_ANOTHER_ADDRESS_ENABLE

Specifies whether connection is to be permitted when the IP address specified in the PORT command at the FTP server does not belong to the client that established the control connection.

ON (specify the character string ON)

Connection to an IP address that does not belong to the client that established the control connection is permitted.

When omitted:

Connection to an IP address that does not belong to the client that established control connection is rejected.

JP1FTS_MASK_CHMOD

Specifies whether to suppress reception of the SITE CHMOD command at the FTP server.#8

ON (specify the character string ON)

Reception of the SITE CHMOD command is suppressed.

When omitted:

Reception of the SITE CHMOD command is not suppressed.

JP1FTS_MASK_PORT

Specifies whether to suppress reception of the PORT command at the FTP server.#8

ON (specify the character string ON)

Reception of the PORT command is suppressed.

When omitted:

Reception of the PORT command is not suppressed.

JP1FTS_MASK_EPRT

Specifies whether to suppress reception of the EPRT command at the FTP server.#8

ON (specify the character string ON)

Reception of the EPRT command is suppressed.

When omitted:

Reception of the EPRT command is not suppressed.

JP1FTS_AUTO_SIGNALMASK_DELETE

Specifies whether to enable reception of SIGHUP, SIGCHLD, and SIGTERM signals by the programs that start after transmission ends.#9

ON (specify the character string ON)

Reception of signals is enabled.

When omitted:

Signals are held.

JP1FTS_C_WKPORT_ENABLE

Specifies whether to permit connection when a well-known port (0 to 1023) is specified for the port number received from the FTP server after the PASV command is issued by the FTP client.

ON (specify the character string ON)

Connection to well-known ports is permitted.

When omitted:

Connection to well-known ports is rejected.

JP1FTS_C_ANOTHER_ADDRESS_ENABLE

Specifies whether to permit connection when a server (IP address) other than the server that established the control connection is specified for the IP address received from the FTP server after the PASV command is issued by the FTP client.

ON (specify the character string ON)

Connection to a server other than the server that established the control connection is permitted.

When omitted:

Connection to a server other than the server that established the control connection is rejected.

JP1FTS_CLMAXOVER_MES

Specifies whether to output messages to the system log when the FTP server receives requests that exceed the maximum number of concurrent transmissions.

ON (specify the character string ON)

Messages are output.

When omitted:

Messages are not output.

JP1FTS_FILE_EXCLUSION

Specifies whether to lock the files to be transmitted.#10

ON (specify the character string ON)

Files to be transmitted are locked.

When omitted:

Files to be transmitted are not locked.

JP1FTS_RECV_SYNC

Specifies whether to apply the data to the disk synchronously with the following triggers:#11

  • Receiving completion of transmitted files

  • Completion of writing of transmission history and event logs into files

ON (specify the character string ON)

Data is applied to the disk.

When omitted:

Data is not applied to the disk.

JP1FTS_HPUX_LONGPASSWORD

Specifies whether HP-UX LongPassword is to be used for the FTP server.

ON (specify the character string ON)

LongPassword is used.

When omitted:

LongPassword is not used.

#1

In AIX, due to the specification of the ls command, the date is displayed in English regardless of the value set for JP1FTS_LS_LANG.

#2

When ON is specified, an auto-start program (process) can become a superuser even if it is started as an ordinary user.

#3

Note the following about specifying ON:

  • An attempt to transmit a file whose size exceeds 4 gigabytes will result in an error.

  • If a file whose size is less than 4 gigabytes is transmitted to a Windows system in the ASCII mode, the size of the resulting file might exceed 4 gigabytes in the Windows system. Therefore, when JP1/FTP is used as an FTP program in a Windows system, the maximum file size set in the Windows version of JP1/FTP might be exceeded during transmission.

#4

In the following circumstances, a timeout might occur at the FTP client and could result in abnormal termination of the transmission:

  • JP1/FTP-to-JP1/FTP transmission

  • File transmission from an FTP server to an FTP client

  • Transmission of large files

  • ASCII mode

  • Size checking function is used

A timeout might occur because it takes time for the FTP server to calculate the file size, resulting in a delay in transmitting the response message. If this becomes a problem, either increase the timeout value for waiting to receive data or execute transmission without using the size checking function.

#5

Although JP1/FTP does not limit the size, transmission might fail due to OS limitations.

#6

Note the following when the transmission size is 4 gigabytes or greater:

  • If the size of the transmission file is to be referenced by a user program using the API library (other than in Linux (IPF version)), you must modify the API library. For details, see 7. API Library.

  • In the list displayed by the ftshistory command, the columns might be shifted in the case of transmission of a large file.

  • Operations-Manager Agent versions earlier than 10-00 do not support a transmission size of 4 gigabytes or greater. Consequently, if the Operations-Manager Console is connected to an Operations-Manager Agent earlier than version 10-00, and if an attempt is made to reference a transmission log whose transmission size is 4 gigabytes or greater, the displayed value will be smaller than the actual transmission size.

#7

Even if the file to be transmitted is smaller than 2 gigabytes, if there are already 2 gigabytes or more in received files, an error will occur if this environment variable is not specified on the machine where these received files are located.

#8

When ON is specified and the FTP server receives the corresponding command, it sends the message 500 'command-name': command not understood to the FTP client.

Help for the corresponding command is not disabled.

#9

By default, the programs that start automatically when transmission ends are started with SIGHUP, SIGCHLD, and SIGTERM masked with sighold(). Consequently, the programs that start automatically when transmission ends hold these signals when they are received.

#10

When ON is specified, you cannot receive a file that is being sent or send a file that is being received, but you can send the same file concurrently.

#11

The timing for applying data to the disk is normally determined by the OS. However, this function forcibly applies data to the disk according to the JP1/FTP timing. Be extremely careful about using this function, since enabling it might cause one of the following performance-related problems:

  • The transmission speed might decline compared to when the function is disabled.

  • File access by other programs might be adversely impacted.

(2) Examples of environment variable definition

(a) JP1FTS_LS_OPTION setting example

This example specifies -lgA in the ls option:

In csh:
>setenv JP1FTS_LS_OPTION -lgA
>ftsstart
In sh:
>JP1FTS_LS_OPTION=-lgA
>export JP1FTS_LS_OPTION
>ftsstart

(b) JP1FTS_LARGEFILE2 setting example

This example enables the transmission of a file exceeding 4 gigabytes.

In csh:
>setenv JP1FTS_LARGEFILE2 ON
>ftsstart
In sh:
>JP1FTS_LARGEFILE2=ON
>export JP1FTS_LARGEFILE2
>ftsstart