WU-ftpd2.6.2 configuration and installation

zhaozj2021-02-16  58

Two years ago, I took it out of the firing.

------------------

WU-ftpd2.6.2 configuration and installation

(Author: mikespook | Published: 2002-12-8 | Views: 322)

Keywords: Linux, Server, FTP, Wu-ftpdlinux 6.5 wu-ftpd2.6.2 Preface: This article is just a guideline that is just a rookie like me. If you are a master, or there is no interest in this. Please don't waste time here. FTP I think everyone has not used it. It must also heard that it is a short writer protocol. This article is to discuss how to use WU-FTPD in Washington University to build its own FTP server in the Linux environment. The first thing to explain is the environment I have chosen. Turbo Linux 6.5, everyone must be strange why I want to choose this environment without using Red Hat. First of all, I think this is a personal habit. I really like Turbo's quaint style, and I don't feel very practical at all. Second is the speed factor, it is not doubtful, and the red hat has a very beautiful interface and powerful toolset. But the speed is slow, it has become a fatal defect. Finally, what I want to say is that when you install Linux, please do not install any servers. You can only install the most basic package (don't forget GCC). why? We are in order to learn, or other simple ways to match the server is to completely install the release. :) wu-ftpd2.6.2, this is the latest version I wrote this article, who doesn't use it? Everyone can download: ftp://ftp.wu-ftpd.org/pub/wu-ftpd-attic/wu-ftpd-2.6.2.tar.gz First, let's see the installation of the wu-ftpd. Copy the wu-ftpd-2.6.2.tar.gz downloaded to / usr / src / directory. Then run [root @ turbo src] #tar -xzvf wu-ftpd-2.6.2.tar.gz, unpacking the wu-ftpd. (About this description: Well, I recently read some books of mathematical modeling, I found that the best way to be lazy is to assume. I assume that you are already familiar with these orders, and know why do this. Of course, if you don't know the reason. Contact me directly!) Go to the wu-ftpd-2.6.2 directory, run [root @ turbo wu-ftpd-2.6.2] #. / Build lnx command. This configuration file is configured for Linux. .............................................. (Waiting for compilation time is not too long, I have used it less than 10 seconds.) On the screen: ------- ---------------------------------------------- | Executables Are in bin directory: || Text Date Bss Dec Hex filename || 146196 14084 100576 260856 3FAF8 / bin / ftpd || ...................................................................... ............ || (This is similar to data, FileName is the final bin file.

) || ......................................................................................................... | DONE | -------------- ---------------------------------------- Haha! Ok, luck is good and compiled! Continue to install, run [root @ turbo wu-ftpd-2.6.2] #. / Build install, compiled Bin files above will go to the place (that is, the path below the FileName, such as "/ bin / FTPD "). In this way, WU-ftpd is installed. Here I also want to say more, now I write this article nonsense so much!), First in the process of installation, you want to root. Otherwise, there is no way to safe. I have a friend asked me: "Why can't I install it with the way you said?" It is actually ignored this. Also, if you have already had a WU-FTPD server, you must remember to save the following files from the new installation 2.6.2, or you have passed the configuration will be overwritten. You have to come again from the beginning ~~ The file to be saved is: / etc / ftpaccess / etc / ftpgroups / etc / ftphosts / etc / ftpusers good! What to do now is to start configuring our Wu-ftpd! First see if there is such a line in the / etc / services file: FTP-DATE 20 / TCPFTP 21 / TCP Generally, the system has been added to the two lines when the system is installed. But we should be rigorous, so that you will not have the final error, you can't think of any problems (care, remember! Remember!). Next, read the /ect/inetd.conf file. About inetd.conf file, I need to say more. It is the profile of the daemon inetd. This program is like a full-featured server. We cannot do not need to run Telnet, FTP, etc. services simultaneously in our system. Everything is responsible by the inetd program. When INETD will start the appropriate service when you need to access what service. So, in order to let FTP run normally, we certainly need to modify the /ect/inetd.conf. Of course, if you are interested, I can write a little experience about my INetD process. The configuration of the inetd.conf file can be said to be simpler. You find this two lines: # wu ftpd (an alternative ftp server) #ftp stream tcp noAit root / usr / sbin / tcpd in.ftpd -l -a modifies the second line, remove the comment: FTP stream TCP NOT / USR / SBIN / TCPD IN.FTPD -L -A is saved to OK! Either from the new boot system (clear this way, it is not Linux style), or start the inetd process from the newly started. I have checked it from the book for a long time, there are many ways, but I can't experiment! I thought of a stupid approach: File / var/run/inetd.pid saved the PID number of the inetd process. Use [root @ turbo ran] #kill `cat /var/run/inetd.pid to kill the inetd process. Start it again. The new settings take effect.

Now you ftp your own machine to see if you can see the login prompt? Of course, it is estimated that you cannot log in, because we have not configured access. The / etc / ftpaccess file is used to control access to access. Generally, Wu-ftpd is mainly modified by modifying this file when configuring. Below, the old method, I give you a configuration example and analyze it together. The following example is that I am using it on my machine, actually a configuration of an Anonymous user access. You should do so before using this configuration. 1. Establish an anonymous user. Although we always say anonymous, anonymity, in fact, when we use FTP to log in to the Linux system, we are a legal user in its system. Because all UNIX operating systems require every process, it is no exception! For this reason, we need to build a user "ftp" (actually not necessarily calling this name, but for your own management, it is still good when you start the name). Edit the / etc / shells file, add this "/ bin / ftponly" in the file. In this way, you can use the / bin / ftponly this shell when adding a user. Add user group FTP with GroupAdd and add user FTP using Useradd. The settings of the user FTP are as follows: ftp: x: 14: 50: ftp user: / bin / ftpd: Group FTP settings are as follows: ftp: x: 50: In general, the system has established a group FTP and user FTP. If you are in the establishment, the system prompts you that you already exist, then you can skip this step. 2. Establishing an FTP directory Since it is anonymous FTP, then there should be such folders in your FTP directory: "Pub", "bin", "etc", "lib". Enter the lib directory, enter the following command to establish a connection file: [root @ turbo lib] #LN -S /LIB/ld-2.1.3.so ld-linux.so.2 [root @ turbo lib] #LN -S / lib /LIBC-2.1.3.so libc.so.6 [root @ turbo lib] #LN -S /LIB/LIBNSL-2.1.3.so LibnSl.so.1 [root @ turbo lib] #LN -S / lib /LIBNSS_FILES-2.1.3.so libnss_files.so.2 [root @ turbo lib] #LN -S /LIB/ld-2.1.3.so ld-linux.so.2 enters the bin directory, enter the following command to establish a connection file : [Root @ Turbo Bin] #LN -S / BIN / GZIP ZCAT enters the ETC directory, establish the Passwd file and group file, the content is as follows: --- Passwd --- | root: *: 0: 0 :: : || ftp: *: 14:50 ::: | ------------ --- group --- | root :: 0: || ftp :: 50: | ------------ 3. Establish / etc / ftpaccess files finally, so many preparations can be configured to configure our FTP server.

----------------------------------- - | Class Anon Anonymous * || Class Nonanon Real, Guest * | | Email MikesPook@hotmail.com || Loginfails 5 || Limit Nonanon 0 WK0000-2359 /Home/ftp/.norealUsers || Message / Home / FTP /Welcome.msg login || Message / Home / FTP / Message CWD = * || compress Yes Anon || Tar Yes Anon || delete no anon || Overwrite no anon || rename no anon || log TRANSFERS Anonymous Inbound, Oubound || Passwd-Check RFC822 WARN | ------------------------------------ --------------- This is the general script that is anonymous. I explain each of the following items. A.CLASS command, the class command assigns a new user class. Its command prototype is like this: Class ClassName Type Address is where ClassName is a user class name, in this example, Anon and Nonanon, respectively. TYPE has only three values: Anonymous, Real, Guest. I can know the meaning from the literal meaning, I will not say much. The last parameter is Address, which is used to control the IP of access. When "*", all IP is allowed to connect. For example, I only want to access people from the 192.168.0 network to "192.168.0. *" Instead of "*" in this example. B.EMAIL command, this doesn't have to say more? It is an administrator's email address. The C.Loginfails command is very useful, which is a good option to prevent the invasion of the exhaustion. Disconnect when the landing fails 5 times. Of course you can set your own times. D.limit command, control the access method. The command prototype is as follows: Limit Class N Times Message_File can say this, this is the most useful command. If you use this command, you will have something you can't think of. Class is the user class name defined by the class command. n is the biggest number of such a user login. Times is accessible. Message_file is a text file that displays the user when refusing to log in. If you do this in this example this example, what is the way? LIMIT Anon 0 WK0000-2359 /HOME/FTP/.noreALUsers? Haha, anonymous users cannot log in.

I have to say more about time. "WK" represents the whole week. "SU", "Mo", "Tu", "We", "th", "fr", "SA" represents Sunday to Saturday, respectively. Time is in the format of HHMM, pay attention to no symbols in the middle! E.MESSAGE command, command prototype: message path when class introduces this command can not talk about banner commands, the functionality of the banner command is to connect to the FTP server, but there is no information displayed when you log in. The Message command is not the same. It has a parameter "when", when it is "login", it is the information displayed after the user successfully logs in. When it is "CWD = PATH", it is when it enters the PATH directory is when it is displayed. F.Compress command, does not use the file conversion function when it is "OFF", use it when "ON". G.tar command, does not use the archive function when it is "OFF", use it when "ON". H.chmod command, when the user does not modify the permissions of the file on the server when "OFF", you can modify it when "ON". The I. Delete command, when the user is "OFF", the user cannot delete the server belonging to their files, which can be deleted when "ON". The J.OverWrite command, when the user is "OFF", the user cannot overwrite the files belonging to their files, which can be overwritten when "ON". K.Rename command, when the user is "OFF", the user cannot be changed to the server to be renamed, and can be changed for "ON". The l.log transfers command, the security log is set up. Command prototype: Log TransferS Typelist Directions Typelist is a comma-separated user class list. Directions indicates data transmission that needs to be recorded, only two options: Inbound and Outbound. M.Passwd-check command, now China's anonymous server will require users to enter email addresses as login passwords, but what I know, many universities of many universities still need email as a login password. Command prototype: Passwd-check strictness Enforcement Parameters Strictness The role is to check the correctness of the email, set to "none" does not check, set to "trivial", as long as the address is "@", set to "RFC822" The most stringent format check. The parameter enforcement is to control an anonymous user access. When the user enters the wrong email address, set to "WARN" will give the error warning but continue, set to "Enforce" will reject the user to log in. N.deny command, this command is not used in the example, but I think it is necessary to mention it. Command prototype: Deny address message-file When you want to reject an IP address or a network segment, you can use this command. For example: Deny 192.168. * /Home/ftp/deny-ip.msg will reject all IP address access from 192.168. Ok, simple introduction is so, and some orders are not very common. I will not introduce it. Originally, I would like to introduce the path-filter and upload commands, but I can't do it, I will write here. If you want to know more, contact me directly, or go to Sunnet's IRC to find me. Welcome to discuss discussions. Since I am a rookie, maybe there is anything wrong. I may also have some details I have not considered.

转载请注明原文地址:https://www.9cbs.com/read-20344.html

New Post(0)