files:

tar <yes|no> [<classglob> ...]

The yes|no parameter toggles the permission on or off, and classglob is a regular expression string that specifies one or more defined classes of users. Again, the conversions that result from the use of this command are specified in the ftpconversions file.

Determine What Permissions Can Apply to User-Created Upload Files

This line is a bit different from the other commands in the permission control section. The umask command determines with what permissions a user can create new files; here it is.

umask <yes|no> <typelist>

The yes|no parameter toggles based on whether a user is allowed to create a file with his default permissions when uploading a file. Like the overwrite command you read about earlier in this section, this command line is specific to uploaded files because the client machine determines how new files are created from a download.

Configure Commands Directed Toward the cdpath

This alias command allows the administrator to provide another name for a directory other than its standard name:

alias <string> <dir>

The alias line applies to only the cd command. This line is particularly useful if a popular directory is buried deep within the anonymous FTP user's directory tree. The following is a sample entry:

alias linux-386 /pub/redhat/7.3/en/i386/

This line would allow the user to type cd linux-386 and be automatically taken to the /pub/redhat/7.3/en/i386 directory.

The cdpath <dir> line specifies the order in which the cd command looks for a given user-entered string. The search is performed in the order in which the cdpath lines are entered in the ftpacess file.

For example, if the following cdpath entries are in the ftpaccess file,

cdpath /pub/redhat/

cdpath /pub/linux/

and the user types cd i386, the server searches for an entry in any defined aliases, first in the /pub/redhat directory and then in the /pub/linux directory. If a large number of aliases are defined, it is recommended that symbolic links to the directories be created instead of aliases. Doing so reduces the amount of work on the FTP server and decreases the wait time for the user.

Structure of the shutdown File

The shutdown command tells the server where to look for the shutdown message generated by the ftpshut command or by the user. The shutdown command is used with a pathname to a shutdown file, such as:

shutdown /etc/rh8ftpshutdown

If this file exists, the server checks the file to see when the server should shut down. The syntax of this file is as follows:

<year> <month> <day> <hour> <minute> <deny_offset> <disc_offset> <text>

year can be any year after 1970 (called the epoch), month is from 0-11, hour is 0-23, and minute is 0-59. deny_offset is the number of minutes before shutdown in which the server disallows new connections. disc_offset is the number of minutes before connected users are disconnected, and text is the message displayed to the users at login. In addition to the valid magic cookies defined in the messages section, those listed in Table 20.2 are also available.

TABLE 20.2 Magic Cookies for the shutdown File

Cookie Description
%s The time the system will be shut down
%r The time new connections will be denied
%d The time current connections will be dropped

Configuring FTP Server File-Conversion Actions

The FTP server can convert files during transfer to compress and uncompress files automatically. Suppose that the user is transferring a file to his Microsoft Windows machine that was TARed and GZIPed on a Linux machine. If the user does not have an archive utility installed to uncompress these files, he cannot access or use the files.

As the FTP server administrator, you can configure the FTP server to automatically unarchive these files before download if the site supports users who do not have unarchive capabilities. Additionally, you can configure an upload area for the users, and then configure the FTP server to automatically compress any files transferred to the server.

The structure of the format of the ftpconversions file is:

1:2:3:4:5:6:7:8

where 1 is the strip prefix, 2 is the strip postfix, 3 is the add-on prefix, 4 is the add-on postfix, 5 is the external command, 6 is the types, 7 is the options, and 8 is the description.

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ОБРАНЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату