Novell is now a part of Micro Focus

Installing Pure-FTPd on SUSE Linux Professional

Novell Cool Solutions: Feature
By Kevin Millecam

Digg This - Slashdot This

Posted: 25 Jan 2005

If you want to add the ability for users to upload files -- via the File Transfer Protocol (FTP) -- to your SUSE Linux server, here are a few steps that will get you up and running.


  1. Start by launching YAST (K Menu => System => YAST).
  2. In the left pane of the YAST window, click "Software".
  3. In the right pane, click "Install and Remove Software".
  4. In the search field, type "FTP".
  5. Click "Search".
  6. From the search results, click the checkbox next to "pure-ftpd".
  7. Click "Accept" to initiate the installation process.

    You will probably be asked to insert one of your install disks so YAST can grab the necessary files. Also, depending on your configuration, YAST might ask you to resolve some conflicts or to install some other packages that Pure-FTPd requires. This is one of the very cool things about SUSE Linux; YAST helps you uncover potential problems during the install process. If you're like me, this can save you hours (or maybe, days) in troubleshooting time.

  8. After the install is finished, I like to search (K Menu => Find) for the installed files to:
    1. see if anything was indeed installed
    2. get an idea where these new files are located

    This trick comes in especially useful if you need to modify a configuration file or start up a related utility (stay tuned).


Much of the documentation I read listed different paths for the commands listed below. My guess is that the paths differ depending on which Linux distribution you are working with. The paths I'm using were arrived at after some trial and error (and several trips to the search results screen above). These paths work on SUSE Linux Professional 9.1.

Pure-FTPd comes with a host of configuration options that can be set at the command line or via the configuration file. I like the latter because I'm not fond of remembering (and typing) strings of cryptic commands. The configuration file also includes comments that do a good job explaining each of the available options.

  1. Browse to the configuration file (/etc/pure-ftpd/pure-ftpd.conf) and open it with a text editor like KWrite or Kate.
  2. You may be able to go with the default configuration. I had to make a small change before anything worked for me: I changed the "PureDB" path in the configuration file from "/etc/pure-ftpd/pureftpd.passwd" to "/etc/pure-ftpd/pureftpd.pdb"
  3. IMPORTANT: To tell Pure-FTPd to read the configuration file (instead of waiting for configuration commands from the command line), you must type this command in a terminal window:
    /usr/sbin/ /etc/pure-ftpd/pure-ftpd.conf
  4. In this configuration, we will be issuing usernames and passwords for our FTP server, we will not be allowing anonymous logins. Pure-FTPd has the ability to manage Virtual Users*. These users don't actually exist as far as your SUSE Linux system is concerned. Pure-FTPd knows about the FTP users and manages their access. Before we set up users, we need to create a system FTP user and a system FTP group to which all virtual users will be associated. Literally thousands of virtual users can share the same system username as long as they have very limited rights (chrooted) and have their own home directory.

  5. Locate or create a directory where you would like to house your FTP files. We're using /srv/ftp/. You'll need to make sure that the user we're about to create, "ftpuser" has rights to the FTP directory.
  6. As root, set up the "FTP Group" by issuing the following in a terminal window:
    groupadd ftpgroup
  7. Now, issue the command to set up the master "FTP User" in the group:
    useradd -g ftpgroup -d /etc/pure-ftpd -s /etc ftpuser
    1. The -g switch designates what group the user will be a member of.
    2. The -d switch designates what directory the user has rights to.
    3. The -s switch is the name of the user's login shell (according to a brief Google search).

    Before you go on to the next step, make sure ftpuser and ftpgroup have rights to the designated FTP directory (/srv/ftp/ in our case). To check the rights, browse to /srv/ftp/ and right-click on the ftp folder. Select "Properties" from the menu. Then click the "Permissions" tab. Here's a snapshot of what the permissions were on the ftp directory when I first checked them.

    To change the permissions, simply type "ftpuser" and "ftpgroup" into the fields as shown. Be sure to check the "Apply changes to all subfolders and their contents" checkbox. This will ensure that as user subdirectories are created in the /srv/ftp/ directory, the proper rights will be inherited.

set up users

  1. As root, set up user phil by issuing this command in a terminal window:
    pure-pw useradd phil -u ftpuser -d /srv/ftp/phil

    (The default configuration will automatically create the folder /srv/ftp/phil/ the first time user phil logs in. This directive can be disabled in the configuration file.)

  2. After you've issued this command, pure-pw will ask you to provide and verify a password for the new user.

  3. Before this account is usable you need to commit your changes, issue the following command at your terminal prompt:
    pure-pw mkdb

  4. To review the details of a user type the following at the terminal prompt:
    pure-pw show phil

start up

  1. To start the Pure-FTPd service (and set it up to start every time your server starts up), select "System" from the left pane of the YAST window.
  2. In the right pane, click "Runlevel Editor".

  3. In the window that opens, click the "Expert Mode" radio button.
  4. Scroll down the list of Services until you find "pure-ftpd"; select it with a single click.
  5. Using the "Set/Reset" pull-down, select "Enable the service".
  6. Using the "Start/Stop/Refresh" pull-down, select "Start the service".

  7. If all goes as planned, you'll see a new window (like the one below) that confirms the service has started.

  8. Be sure to click the "Finish" button before leaving the Runlevel Editor to save your changes.

test, test, test

To test my server, I stepped over to my Windows box and fired up the FTP client. I then tried to log into the server (using the IP address of the server machine) as FTP user "phil". This test helped me uncover a few problems with rights and configuration. It ended up being a good way to do some troubleshooting.

I'm new to this Linux world so if you see a problem with my technique or have a better way to do anthing I've described above, please send in your suggestions.

learn more

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates