When you try to connect to a remote computer using FTP, the remote system asks you for a username and password, and it is almost impossible to require each user to request an account for each server system on the vast Internet. The Internet offers an excellent solution-anonymous service, which allows users to access even if they do not have an account on their computer. It only requires typing anonymous service account name, as for password information, the system will give you some prompts, you just follow the prompts to enter the relevant information. The establishment of anonymous FTP service may be slightly different under different operating system environments, and the following example introduces the establishment and application of anonymous FTP server in UNIX environment.
first, how to create an anonymous FTP server
1. Add new user FTP, set its home directory for any user has no write permission;
2. Create a new group Anonymou, it can only be used by anonymous FTP;
3. Create a bin directory under the FTP user's home directory, which belongs to the root user and cannot be written to any user;
4. Create a etc directory in the FTP user's home directory, it belongs to root user, and can not write to any user;
5. Create a public directory under the FTP user's home directory, which belongs to the FTP user and can be written to any user. If you do not allow other users to have storage capabilities on your computer for security reasons, you can set their permissions to 555;
6. Put the LS program into the created bin directory, and modify it to 111 mode, that is, to any user can only execute;
7. Create passwd and group two files in the ETC directory that you have created, and set them to 444 ways (read-only).
Second, create anonymous FTP----Log on under Unix with Root, and then follow the steps below to establish an FTP server gradually.
1. Establish a new group of Anonymou----#mkgroupanonymou
2. Create new user FTP, and FTP users belong to the Anonymou group----#mkuserpgrp = ' Nonymou ' home= '/u/anonymou ' ftp
3. Create the relevant directory under the user directory
#cd/u/anonymou
#mkdiretc
#mkdirbin
#mkdirpublic
4. Copy ls to/usr/anonymou/bin and set its read and write properties
#cp/bin/ls./bin
#chmod111./bin/ls
5. Create the/u/anonymou/etc/group file----Add one line to the file: anonymou:!:201:
6. Create a/U/ANONYMOU/ETC/PASSWD file----add one line to the file:
Ftp:*:213:201::/u/anonymou:/bin/ksh
7. Modify the properties of/u/anonymou/etc/group and/u/anonymou/etc/passwd files
#chmod444/u/anonymou/etc/passwd----#chmod444/u/anonymou/etc/group
8. Set the way to read and write each subdirectory under the home directory
#chownftppublic
#chmod555public
#chmod555bin
#chmod555etc
#cd.
#chmod555anonymou
Third, anonymous FTP service Application example----the use of anonymous services, users can easily use the public subdirectory of the common information, such as: Public software packages, software tools, various information management system software, etc., which reduces the enterprise due to the purchase of software needs of repeated input. The following examples illustrate the use of anonymous FTP. ----on any front-end computer that can start FTP applications, you can implement FTP functionality by typing the following series of commands under DOS or Windows.
C:\ftp.exe (assuming the file Ftp.exe is in the root directory)
Ftp>openzxserver (server name is Zxserver)
Connectedtozxserver.
220zxserverFTPserver (version4.1satnov2312:52:09cst1991) ready.
User (Zxserver: (none): FTP (enter user name FTP)
331guestloginok,sendidentaspassword.
Password: (Direct return)
230guestloginok,accessrestrictionsapply.
Ftp>binary (transfer data in binary mode)
200TypesettoI.
Ftp>cdpublic
250CWDcommandsuccessful
Ftp>gethomeface (fetch file Homeface)
200Portcommandsuccessful
150Openingdataconnectionforhomeface
226Transfercomplete 3300bytesreceivedin0.05seconds please contact the site, timely note your name. Contact Email: edu#chinaz.com (change # to @).