系统管理指南:网络服务

Procedure如何配置 README 选项

首次访问目录时,可能会列出 README 文件。要配置 README 选项,请将以下项添加到 ftpaccess 文件中。

  1. 成为超级用户或承担等效角色。

    角色包含授权和具有一定权限的命令。有关角色的更多信息,请参见《系统管理指南:安全性服务》中的“配置 RBAC(任务列表)”。有关如何使用主管理员配置文件配置角色,请参见《系统管理指南:基本管理》中的第 2  章 “使用 Solaris Management Console(任务)”

  2. 将以下项添加到 ftpaccess 文件中。


    readme message_file [when [class...]]
    readme

    该关键字用于指定当用户登录或更改工作目录时,将检查的消息文件。如果该消息文件存在,则将通知用户,并指出文件被修改的日期。

    message_file

    要检查的消息文件的名称。

    when

    设置为 logincwd=dir 的参数。请参见以下示例。

    class

    class 规范允许仅向特定类的成员显示消息。


    注 –

    greetingbanner 关键字也可用于向用户发送消息。请参见 ftpaccess(4)



示例 28–11 配置 README 选项


readme  README*     login

readme  README*     cwd=*  

上面的示例说明,登录或更改目录时将列出与 README* 匹配的所有文件。以下是基于上面示例中使用的设置的登录示例。


% ftp earth

Connected to earth.

220 earth FTP server ready.

Name (earth:rimmer): ftp

331 Guest login ok, send your complete e-mail address as password.

Password: 

230-

230-Welcome to earth -- local time is Thu Jul 15 16:13:24 

1999.

230-

230-You are number 1 out of a maximum of 10.

230-All transfers are logged.

230-

230-If your FTP client crashes or hangs shortly after login 

please try

230-using a dash (-) as the first character of your 

password.  This will

230-turn off the informational messages that may be 

confusing your FTP

230-client.

230-

230-Please send any comments to ftpadmin@earth.

230-

230 Guest login ok, access restrictions apply.

ftp> cd pub

250-Please read the file README

250-  it was last modified on Thu Jul 15 16:12:25 1999 - 0 

days ago

250 CWD command successful.

ftp> get README /tmp/README

200 PORT command successful.

150 Opening ASCII mode data connection for README (0 

bytes).

226 ASCII Transfer complete.

ftp> quit

221 Goodbye.