# Configuring PURE-FTPD

## cmuench

Where are all the config files for pure-ftpd in gentoo  When I clicked on the pure-ftpd module in webmin it gave me this error.

```
The Pure-FTPd server /usr/local/sbin/pure-ftpd could not be found on your system. Maybe it is not installed, or your FTP Server module configuration is incorrect.
```

What should I do I already emerged it and started it.  Also when I start it from command line with this code 

```

/etc/init.d/pure-ftpd restart
```

It puts 2 RED exclamations points to the right but then it starts it and yes I already edited the file 

/etc/conf.d/pure-ftpd and uncommented some of the stuff out.  any help would be appreciated because I need this FTP server running by Wed. morning.[/code]

----------

## ikaro

You are using pure-ftpd via webadmin, and I think that you got the path wrong to where the binary is located, whcih that first.

secondly, the configuration of the server is made im /etc/conf.d/

further, there is the man page, and a very usefull and well written documentation website.

I sugest that you check if pure-ftpd isnt already running when you try to restart it.

after configuring pure-ftpd , try to start it again.

----------

## elz_dad

I just configured pure-ftpd on my system this morning; this was all I did:

1. emerge pure-ftpd

2. edit /etc/conf.d/pure-ftpd to make the following changes

uncomment the line IS_CONFIGURED="yes"

change the "DISK_FULL" line so that it says: DISK_FULL="-k 70%"

add "-u 1" to the "MISC_OTHER" to prevent people connecting as root, so that it now reads:  MISC_OTHER="-A -x -j -R -u 1"

3. start the daemon:

```
# /etc/init.d/pure-ftpd start

```

4. update the startup files so that pure-ftpd is automatically started:

```
# rc-update -a pure-ftpd default

```

Works fine now.  If this doesn't help you, maybe you could post the exact errors you're seeing when the startup fails?

nick

----------

## cmuench

When I go to restart it with the code /etc/init.d/pure-ftpd restart

 it gives me this error

```
/etc/init.d/pure-ftpd restart

 * Stopping Pure-FTPd...                                                  [ !! ]

```

What should I do as it doesn't give me an error but then when I issue the command 

```
/etc/init.d/pure-ftpd restart
```

It tell me this eror code.

```
 /etc/init.d/pure-ftpd start

 * WARNING:  "pure-ftpd" has already been started.
```

----------

## elz_dad

Well, in trying to work out what might be causing your symptoms, I reproduced your problem and got stuck myself trying to get the daemon started.  This is the way I got myself going again:

```

1. # ps -A | grep ftpd

2. kill -9 xxxx

3. # rm -rf /var/run/pure-ftpd.pid

4. # nano -w /etc/init.d/pure-ftpd  

   ! in the "stop()" section, change the line to include "--oknodo":

       start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/pure-ftpd.pid

5. # /etc/init.d/pure-ftpd restart

    * Stopping Pure-FTPd...                                           [ ok ]

    * Starting Pure-FTPd...                                           [ ok ]

6. # nano -w /etc/init.d/pure-ftpd

   ! revert the change you made previously

```

Notes:

1. Look to see if the daemon is running.  It probably isn't, but it it is then you'll see a line like this

```

15120 ?        00:00:00 pure-ftpd

```

in which case:

2. use the "kill" command to get rid of it ("e.g. kill -9 15120")

3. this pid file is used by the startup script to keep track of whether the daemon exists, so you don't want a stale one hanging around

4. edit the startup script for the pure-ftpd daemon to add a line that makes it tolerant of failures

5. restart your daemon

6. put the startup script back the way it was

Hope this helps!

nick

----------

## Xer0

Could someone please explain how the --oknodo option works? I experienced this same problem and fixed it following nick's instructions, and also came across a problem stopping named which I could fix using --oknodo. The man page states: "Return exit status 0 instead of 1 if no actions are (would be) taken.", but I don't find this particularly enlightening.

- Xavier

----------

