| United States-English |
|
|
|
![]() |
HP-UX Remote Access Services Administrator's Guide: HP-UX 11i v2, HP-UX 11i v3 > Chapter 2 Configuring FTPAdditional Clauses in ftpaccess |
|
Apart from the standard clauses defined in the /usr/newconfig/etc/ftpd/examples/ftpaccess file, the following additional clauses are available in the /etc/ftpd/ftpaccess file: These clauses are explained in the following sections. Using this feature, you can specify email addresses for anonymous upload notifications. You can also specify a sender’s email address. By default, the sender’s address is specified as wu-ftpd. You can specify this for virtual hosts also. If the recipient attempts to reply to a notification, or if downstream mail problems generate bounces, ensure that the mailfrom address is a valid address, to avoid delivery problems. The syntax for the email-on load feature is as follows: If you specify virtual host addresses, addresses only on a particular host receive notification messages of anonymous uploads. Otherwise, notifications are sent to the global addresses. The defaultserver addresses apply only to real hosts and not to virtual hosts. Hence, the real host receives notifications of uploads on its default anonymous area. However, with this option set, the virtual hosts are not notified. For more information on the email-on-load feature, type man 4 ftpaccess at the HP-UX prompt. Following are examples of the email-on-load feature:
Specifies the name of a mail server that accepts upload notifications for the FTP daemon. You can use this option to notify any user of anonymous uploads.
Specifies the email addresses to be notified of anonymous uploads.
Specifies the sender’s email address for anonymous upload notifications. You can configure timeout values used within the FTP daemon by using the timeout options. Table 2-2 describes the FTP daemon timeout values. Table 2-2 FTP Daemon timeout Options
The timeout syntax is as follows:
Following are some examples for the timeout clause:
Displays the message Current IDLE time limit is 200 seconds; max 7200
Displays the message Current IDLE time limit is 200 seconds; max 6200
Disables RFC 931-based authentication, because 0 is specified. This feature is used to refuse (or override) an FTP session when a reverse DNS lookup fails. The syntax for the enhanced DNS extension feature is as follows:
This feature allows you to impose control on the address reported in response to a PASVcommand and on the TCP port numbers that can be used for a passive data connection. When a control connection matching the cidr (classless inter-domain routing) requests a passive data connection (PASV), the externalip address is reported. The syntax for controlling the reported address is as follows:
Example 2-1 The passive Clause The following are some examples for the passive clause:
In this example, clients connecting from the class A network - 10 are informed that the passive connection is listening on the IP address 10.0.1.15.
In this example, if a control connection from the class A network - 10 exits, the port range within 90 and 100 is randomly selected for the daemon to listen to.
This feature enables the site administrator to selectively allow PORT and PASV data connections. Usually a connection is not established if the remote IP address of the data connection does not match the remote IP address of the control connection data. You can specify multiple passive addresses to handle complex or multi-gateway networks. The syntax for selectively allowing PORT and PASV data connections is as follows:
The keepalive clause allows you to control network disconnect by setting the TCP SO_ALIVE option for data sockets. You can specify yes to set the TCP option, or no to use the system default settings, which is usually off. HP recommends that you set the keepalive clause to yes to retain the network traffic connected. The syntax for keepalive clause is as follows:
You can specify clauses to control whether a real or guest user is allowed access to areas on the FTP site other than their home directories. The syntax for the clauses that control access to areas on the FTP site is as follows:
Example 2-2 The restricted-uid and restricted-gid Clause The following are some examples for the restricted-uid and restricted-gid clauses:
These clauses do not replace the use of guestgroup and guestuser. Instead, you can use these clauses to supplement the operation of guests. You can use the unrestricted-uid and unrestricted-gid clauses to allow users who are otherwise restricted to use their home directories. This feature allows you to retrieve files that are otherwise denied by the noretrieve clause. The allow-retrieve clause overrides the noretrieve clause. The syntax for retrieving the files is as follows:
Using the virtual server clauses, you can restrict user access to both the virtual and non-virtual domains. Also, you can use the options specified in the virtual clause to display the virtual host name. The syntax for the virtual clause is as follows:
Table 2-3 specifies different virtual clause examples. Table 2-3 virtual Clause Options
This feature defines the default host name of the FTP server that is displayed in the greeting message. If you do not specify this clause, the default host name of the local machine is used. The syntax for the specifying the default host name is as follows:
This feature allows you to control the information specified in the greeting message before a remote user logs in. For the greeting message, you can specify the host name and daemon version, only the host name, or only the message FTP server ready. The default greeting clause is greeting full. The syntax for the greeting clause is as follows:
Using the clause greeting text <message>, you can print a message different from the standard greeting message. This feature allows you to limit the total time for a session. By default, a limit is not set. Real users are never limited. The syntax for limiting the total time of a session is as follows:
This feature allows you to force the UIDs and GIDs in a range to be treated as guests. The syntax for treating UIDs and GIDs as guests is as follows:
This feature allows you to specify UID and GID values for which the FTP server access is denied or allowed. By default, allow access is set. The syntax for denying or allowing FTP server access to UID and GID values is as follows:
Example 2-5 The deny-gid, allow-gid and allow-uid Clauses The following are some examples for the deny-gid, allow-gid, and allow-uid clauses:
This denies FTP access to all privileged or special users and groups on a Linux system except the anonymous FTP user or group. You can set the upload and download ratio to limit the user’s ability to upload and download files. By default, a ratio is not set. The syntax for setting the upload and download ratio is as follows:
The nice clause allows you to modify the nice value of the ftpd server if the remote user is a member of the named class. If you do not specify the class, then use nice-delta as the default adjustment to the ftpd server process’ nice value. The default nice value adjustment is used to adjust the nice value of the server process only for those users who do not belong to any class for which a class-specific nice directive exists in the /etc/ftpd/ftpaccess file. The syntax for the nice clause is as follows:
The defumask clause allows you to set umask for a file created by the ftp daemon if the remote user is a member of the named class. You can enter multiple defumask entries in the /etc/ftpd/ftpaccess file. If you do not specify a class for a defumask entry, then use umask as the default for classes that do not have a defumask entry. The syntax for the defumask clause is as follows:
This feature allows you to limit the number of lines of output that can be sent to the remote client. By default, the limit is set to 20. The syntax for controlling the maximum number of lines of output is as follows:
Example 2-8 The site-exec-max-lines Clause The following are some examples for the site-exec-max-lines clause:
Example 2-8 contains three example statements for the site-exec-max-lines clause. The first example limits the output from SITE EXEC (therefore SITE INDEX) to 200 lines for remote users. The second example specifies no limit for local users. The third example sets a limit of 25 lines for all other users. This feature specifies the root directory when a user logs in as an anonymous or guest user. The syntax for specifying the root directory is as follows:
Example 2-9 The anonymous-root Clause The following are examples for the anonymous-root clause:
Example 2-9 contains two examples for the anonymous-root clause. The first example changes the root directory of all the anonymous users to the directory /home/ftp, the anonymous user’s current working directory being the home directory. If an FTP user exists in the /home/ftp/etc/passwd file, the user’s current working directory is the home directory. In the second example, the root directory of all the anonymous users in the class localnet is changed to the directory/home/localftp, and the FTP user’s home directory in /home/localftp/etc/passwd specifies the initial current working directory. Example 2-10 The guest-root Clause An example for the guest-root clause is as follows:
The example changes the root directory of all the guest users to the /home/users directory. The directory of users in the range 100 through 999 and user sally is changed to the /home/staff directory, and the current working directory is obtained from their entries in the /home/staff/etc/passwd file. This clause enables the server to listen on any address. If you do not set this value, the server listens for connections on all the IP addresses. HP recommends not to use this clause because it breaks virtual hosting.
The syntax for enabling the server to listen is as follows:
For detailed information on all the clauses in the /etc/ftpd/ftpaccess utility, type man 4 ftpaccess at the HP-UX prompt. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||