41.2. The WU-FTPD Server Module

To configure the FTP server from within Webmin, click on the WU-FTPD Server icon under the Servers category. If it is properly installed and working, the module's main page (as shown in Figure 41.1) will be displayed. Each of the icons will take you to a form for setting a class of configurable options, such as those related to logging or messages and banners.

Figure 41.1. The WU-FTPD Server module.


If the module cannot find the WU-FTPD server executable, an error message like The FTP server /usr/sbin/in.ftpd could not be found on your system or The FTP server configuration file /etc/ftpaccess does not exist will be displayed. This usually means that the program is not installed. Check your Linux distribution CD or website for the wu-ftpd package and install it using the Software Packages module, covered in Chapter 12. It can also mean that the module is looking in the wrong location for the server program or configuration file. If you are certain that WU-FTPD is installed, see Section 41.14 “Configuring the WU-FTPD Server Module” for information on adjusting the paths in which Webmin looks for them.

Sometimes, even though WU-FTPD is installed, it will be disabled by default. If you run ftp localhost at the command prompt and get back the error message Connection refused, no FTP server is running. This may be because no inetd or xinetd service has been created for FTP yet, or because one exists but it is disabled. Follow the instructions below to set up or activate a super server service for WU-FTPD.

If WU-FTPD really does need to be installed, you must first remove any other FTP server (such as ProFTPD or PureFTP) that is currently installed on your system. Make sure that you kill all of its processes as well, so that nothing is left listening on the FTP port. You can verify that the other server has been fully shut down by running ftp localhost at the command prompt. The error message Connection refused should be displayed, indicating that nothing is listening on port 21.

After installing WU-FTPD, you will need to configure inetd or xinetd to listen on the FTP port and run the server program. Before you can do this, find out where the program has actually been installed on your system. Typically it will be at /usr/sbin/in.ftpd, but this may differ depending on your operating system.

If your system uses the superior xinetd super server, use the following instructions to set up the FTP service. Because many packages include a /etc/xinetd.d configuration file for the server, some of the fields explained in the following list may be filled in correctly already.

1.
Go to Webmin's Networking category and click on the Extended Internet Services icon. If it does not exist, xinetd is not installed and you will need to set up the server using inetd instead.

2.
Check for an existing service named ftp or wu-ftpd on the module's main page. If one exists, click on it—otherwise, follow the Create a new internet service link above or below the table.

3.
In the Service name field, enter ftp (unless it has already been filled in).

4.
Make sure the Yes option is selected in the Service enabled? field.

5.
Leave the Bind to address field set to All, and the Port number to Standard or 21.

6.
Select Stream from the Socket type menu and Default or TCP from the Protocol list.

7.
In the Service handled by field, select the Server program option and enter the path to the WU-FTPD executable with the arguments -l -a (such as /usr/sbin/in.ftpd –l -a) into the adjacent text box.

8.
In the Run as user field, enter root.

9.
Select No for the Wait until complete? field.

10.
Leave all the other fields set to their defaults, and hit the Save or Create button at the bottom of the form.

11.
Back on the module's main page, click the Apply Changes button located below the list of services.

To set up an inetd service for WU-FTPD using the Internet Services and Protocols module, you can also follow these steps:

1.
Go to Webmin's Networking category and click on the Internet Services and Protocols icon. If it does not exist, your system is probably using xinetd.

2.
On the module's main page, click on ftp in the Internet Services table. If it is not visible, enter ftp in the field next to the Edit service button and hit the button. Either way, the same page for editing the FTP protocol service will be displayed.

3.
In the Server Program section, select Program enabled.

4.
In the Program field, select the Command option and enter the full path to the WU-FTPD server executable into the field next to it, such as /usr/sbin/in.ftpd. In the Args field, enter in.ftpd –l -a.

5.
Set the Wait mode to Don't wait and enter root in the Execute as User field. All others can be left unchanged.

6.
Click the Save button and then, back on the module's main page, hit Apply Changes.

Once WU-FTPD has been set up to run from inetd or xinetd, you can test it by using the command-line UNIX FTP client to connect to your own system. Just run ftp localhost, and make sure that you can log in as some user other than root. If not, check your log files (using the System Logs module covered in Chapter 13) for any message from inetd or xinetd that may explain what went wrong.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.184.189