- 论坛徽章:
- 0
|
Due to the addition of wu-ftp (SUNWftpr, SUNWftpu) into Solaris 9 the procedure to create an anonymous ftp server has radically changed from Solaris 8. In Solaris 9 a new command has been added to assist the creation of an anonymous ftp server. This command is ftpconfig.
This command will copy and set up all the components needed to operate an anonymous FTP server, including creating the ftp user account, creating device nodes, copying /usr/lib files, and copying timezone data. The passwd and group files set up have been stripped down to prevent malicious users from finding login names on the server. The anonymous file area will be placed under ftpdir. If the ftp user account already exists, then the current FTP area is used, and the system files in it are updated. All other files are left untouched.
This command should be run to update the anonymous FTP area's configuration whenever a system patch is installed, or the system is upgraded.
EXAMPLE
=======
In this example you want your anonymous area to be called /anonymous.
# ftpconfig -d /anonymous
Running this command will create a chroot environment in the /anonymous directory. An anonymous user will ONLY be able to retrieve files from the directory specified in the allow-retrieve field of the /etc/ftpd/ftpaccess file. So by default this contains ....
# grep allow-retrieve /etc/ftpd/ftpaccess allow-retrieve relative class=anonusers /pub
Therefore in this example, the anonymous user can only retrieve files placed in the /anonymous/pub directory. If the anonymous user tries to access other files from the /anonymous directory, he will recieve the following error :
ftp>; get jonty
200 PORT command successful.
550 /jonty is marked unretrievable |
|