Next Previous Contents

## 3. Configuration

## 3.1 User management

You can manage the users simply by editing /etc/passwd and, if your system supports it, /etc/shadow. Any user existent in /etc/passwd can connect to the FTP server if he has a usable password and meets certain configurable criteria. Having anonymous users is possible by setting a configuration variable called ANONYMOUS_USER to yes. PAM is also supported.

## 3.2 The configuration file

### The global structure

In the "global" structure, you can assign values to configuration options. The syntax is like the following:

> `

>     global {
>       name1="value1"
>       name2="value2"
>     }

> `

### User structures

There are also user structures, in which you can override the global settings for particular users. Example:

> `

>     global {
>       name1="value1"
>       name2="value2"
>     }
>     user foo {
>       name1="value3"
>     }

> `

If the user foo is logged in, name1 will be value3. If another user is logged in, name1 will be value1. name2 is always value2.

### Group structures

You can also define options for groups of users. It is just as it would be for one user, but you can put more than one user in a group. You can also put system groups into them by using the @ character. Example:

> `

>     group foo,bar,@baz {
>       name1="value1"
>     }

> `

This options affect the users foo and bar and every user who is in the system group baz. A supplementary membership is sufficient.

### Directory structures

You can set options which affects only the users who are in a certain directory, or in any subdirectory of it, recursively. Note that you must put these structures inside the global, user and group structures. This way, you can also override directory-specific settings for particular users. Example:

> `

>     global {
>       name1="value1"
>       directory "/foo" {
>         name1="value2"
>       }
>     }
>     user bar {
>       directory "/foo" {
>         name1="value3"
>       }
>     }

> `

In this example, name1 will be value3 if the user bar is in the directory /foo. It will be value2 if another user is in the directory /foo. In any other case, it will be value1.

An explanation of the name/value pairs is in the example configuration file supplied with bftpd (if you are not upgrading, this file has already been copied to /etc on your system). Modify it so that it fits your needs. The defaults should be OK though.

Next Previous Contents