分类:
2008-05-09 20:14:16
ftp:*:997:995:Anonymous FTP Account:/disk2/ftp:/dev/null
The login shell /dev/null is recommended but not required, and the home directory can be anywhere, with reservations as explained in the next step.
Tip: For public servers, Silicon Graphics recommends that you create a shadow password file. Run the pwconv command from the /etc directory:
# pwconv
This command updates the contents of /etc/passwd and moves encrypted passwords to /etc/shadow, which is then inaccessible to non-privileged users.
# mkdir /disk2/ftp
Then, if it is a separate disk or disk partition, you can mount the device on it.The anonymous FTP home directory you make must be the same one you specify in the /etc/passwd file.
# cd /disk2/ftp # mkdir bin dev etc lib lib32 pub incoming
In addition to the standard bin, dev, etc, lib, and pub directories, you may wish to create an incoming directory for incoming files.
# cp /sbin/ls bin
Note: In order for the ls command to work with an IRIX 6.5.x system, perform the following steps:
# cp /lib32/libc.so.1 /disk2/ftp/lib32# cp /lib32/rld /dir2/ftp/lib32# chmod -R 555 /dir2/ftp/lib32
# cp /etc/passwd /etc/group etc
A good choice for the contents of ~ftp/etc/passwd might be
root:*:0:0:Super-User:/:/dev/null bin:*:2:2:System Tools Owner:/bin:/dev/null sys:*:4:0:System Activity Owner:/var/adm:/dev/null ftp:*:997:999:Anonymous FTP Account:/disk2/ftp:/dev/null
A good choice for the contents of ~ftp/etc/group might be
sys:*:0: other::995: guest:*:998:
# /sbin/mknod dev/zero c 37 0 # cp /lib/libc.so.1 /lib/rld lib
The dev/zero file helps zero out sensitive data; ~ftp/bin/ls requires the library files.
# chmod 444 etc/* dev/*
# chown root.sys bin dev etc lib . # chmod 511 bin dev etc lib .
In the chown command, the dot separates owner and group.
# chown root.sys pub # chmod 755 pub
# chown ftp.other incoming # chmod 333 incoming
Any FTP user can now get or put files in the incoming directory, but they must know the name of the file beforehand, because they cannot list directory contents.
Caution: By allowing write permission, you make it possible for anonymous FTP users to fill the entire disk partition.
ftp: postmaster
Run the command newaliases to make this take effect.
For example, the following entry in /etc/inetd.conf means FTP sessions and get or put operations (excluding byte count) are logged in /var/adm/SYSLOG:
ftp stream tcp nowait root /usr/etc/ftpd ftpd -ll
# /etc/killall -HUP inetd
Note: Although FTP logging records in /var/adm/SYSLOG show any passwords entered by users logging in, no password checking is done for anonymous FTP. The convention is for anonymous users to enter their e-mail addresses for passwords, but they could just as easily enter another user's address or anything at all.
14.chang the mode of your directory by type command:
#chmod 777 /disk2/ftp
That's all,enjoy it.:-)。
You can get help from infosearch directory.