Resource Sharing: FTP

Abstract

WU-FTP allows you to create and set up an FTP server. With the latter, your company can share files with people connected to the Internet (or to your intranet). According to your configuration, they could eventually upload files on your server.

Installation

The first operation is to install WU-FTP on your system. Use rpmdrake or type urpmi wu-ftp in a terminal.

The server's configuration is done through Webmin's FTP server module. You will find it in the Servers category. If you can't find it, you can get the wuftpd.wbm file on the Webmin site and install it by using the Webmin configuration module in the Webmin category. If you click on the Webmin modules icon, you will end up on a page where you can tell Webmin the path to the module to be installed (or removed).

Step-by-Step Configuration Example

Figure 6.5. WU-FTP's Main Configuration Page

In the Message and Banners section, specify the e-mail address of the FTP administrator in Owner's email address. This e-mail will be seen by users logging on your server. They can therefore send you a report if they have any problem.

Figure 6.6. Wu-FTP Banner And Messages

If you plan to maintain a public FTP server, you should look at the options in the Anonymous access section. Anonymous access allows people with accounts on your computer to login with an FTP client and to retrieve files. Specify the Anonymous root directories and/or the Guest root directories with the path of the anonymous/guest FTP directories. You can specify a group for all files for anonymous user through Unix groups for anonymous users. The last option allows you to activate the check (and eventually deny) on the anonymous password (Anonymous FTP password check). Anonymous users don't have passwords to access to your FTP server. In general, they enter their e-mail address as a password. For example, you can force users to enter a password with the @ character. Moreover, you can deny some specific anonymous passwords through Anonymous FTP passwords to deny.

Figure 6.7. Anonymous FTP Configuration Page

The Permissions section allows you to restrict use of some FTP commands with Command restrictions. By default, anonymous and guest users don't have the rights to use dangerous commands like chmod of delete. To avoid security problems, you can deny some file names to be uploaded with Disallowed upload filenames.

The last step is to create new aliases in Aliases and Paths. If you want your users to be allowed to access specific directories (like /home/project/marketing), specify an alias (like marketing) that can be reached by FTP users.

Advanced Configuration

The first section, Users and Classes, contains options about user access. You can specify the users who will be treated as guests. For example, if you have many local users and you want to allow them to access your FTP tree, add their user ID to guest. The same thing could be done for the guest group. In the same way, the Use class allows to force a specific access type according to the client's source address. By creating a user class, you can configure specific options in other sections applied to this class. For example, you can create a specific class for a department of your company, which has permissions to post data on your server. In the same time, another department would be represented by another class and would have only read and get access. The last point is to deny access. You can (and actually have to) deny some users like daemon or shutdown. The default value contains system users. You can specify users or groups ID to deny.

The Messages and Banners section allows you to configure the message the server will display. You can specify the welcome message At login or in each directory: Entering any directory. The default value tells WU-FTP to look for a .message file in each directory and to display it. The same configuration idea is repeated with README files. The next option allows you to choose the Greeting level, if you want to display the hostname or any other banner (Hostname for messages). You can display a message before a user logs in in the Pre-login banner field.

The options in the Limits and Access Control section enable to deny access from a specific IP class. FTP requests from these IP addresses will get an error message through the Deny access from option. You can limit concurrent access to your server for a specific class (Concurrent user limits) with an error message in case of problem, or limit the number of files (or bytes) transferred in an FTP session (File and data transfer limits). This options is quite detailed, because you can choose if the transfer limit is applied to data or text, and to upload and/or download transfers. You can choose access rights to a specific file with Deny access to files and Allow access to files even if denied. The last option configures the FTP session limit for some particular users: Anonymous session limit and Guest session limit, the number of time a user can type a wrong login/password before being rejected (Maximum login failures) and the user's ability to change group (Can switch groups?).

The main option in the Networking section is used to configure passive FTP connections. You can specify which IP addresses have the right to establish passive FTP connections (Addresses for PASV connections) and on which server ports (Ports for PASV connections).

The Logging section is used to configure which users are logged. Each specific action: All commands, Transfer and Security violations can be recorded in the session journal.

At last, options in the Miscellaneous Options section allow you to specify the command launched by WU-FTPD to display each listing mode and the FTP server's process priority with the Service process nice level. The last option configures the umask of uploaded files (Default umask for uploaded files). You can configure this file-permission mask to allow particular rights on uploaded files.


Hosted by Internet News Unlimited