# Installing Pure-FTPd

## Fredrich

I've installed pure-ftpd on my gentoo box. This is what I've done this far:

emerge -pv pure-ftpd

*change use flags*

emerge pure-ftpd

nano /etc/conf.d/pure-ftpd

/etc/init.d/pure-ftpd start

When I try to log in everything works great. It's just that no folders are showing up when I'm logged into the ftp and when I try to make a folder, it gets deleted/not created.

Anyone? I'm new to Linux so try taking it easy on me  :Smile: 

----------

## Bio

Hello,

You should paste your /etc/conf.d/pure-ftpd file, that would help

Did you uncomment the IS_CONFIGURED="yes" line?

----------

## Fredrich

# Config file for /etc/init.d/pure-ftpd

##Comment variables out to disable its features, or change the values in it... ##

## This variable must be uncommented in order for the server to start ##

IS_CONFIGURED="yes"

## FTP Server,Port (separated by comma) ##

## If you prefer host names over IP addresses, it's your choice:

## SERVER="-S ftp.rtchat.com,21"

## IPv6 addresses are supported.

## !!! WARNING !!!

## Using an invalid IP will result in the server not starting,

## but reporting a correct start!

## SERVER="-S 192.168.1.175,21"

## By default binds to all available IPs.

SERVER="-S 21"

## Number of simultaneous connections in total, and per IP ##

MAX_CONN="-c 30"

MAX_CONN_IP="-C 10"

## Start daemonized in background ##

DAEMON="-B"

## Don't allow uploads if the partition is more full then this var ##

DISK_FULL="-k 95%"

## If your FTP server is behind a NAT box, uncomment this ##

USE_NAT="-N"

## Authentication mechanisms (others are 'pam', ...) ##

## Further infos can be found in the README file.

AUTH="-l unix"

## Change the maximum idle time (in minutes) ##

## If this variable is not defined, it will default to 15 minutes.

#TIMEOUT="-I <timeout>'"

## Facility used for syslog logging ##

## If this variable is not defined, it will default to the 'ftp' facility.

## Logging can be disabled with '-f none'.

LOG="-f none"

## Charset conversion support *experimental* ##

## Only works if USE "charconv" is enabled (only Pure-FTPd >=1.0.21).

## Set the charset of the filesystem.

# CHARCONV="--fscharset <charset>"

## If you want to process each file uploaded through Pure-FTPd, enter the name

## of the script that should process the files below.

## man pure-uploadscript to learn more about how to write this script.

# UPLOADSCRIPT="/path/to/uploadscript"

## Misc. Others ##

MISC_OTHER="-A -E -x -j -Z"

#

# Use these inside $MISC_OTHER

# More can be found on "http://download.pureftpd.org/pub/pure-ftpd/doc/README"

#

# -A [ chroot() everyone, but root ]

# -e [ Only allow anonymous users ]

# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]

# -i [ Disallow upload for anonymous users, whatever directory perms are ]

# -j [ If the home directory of a user doesn't exist, auto-create it ]

# -M [ Allow anonymous users to create directories. ]

# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]

# -x [ In  normal  operation mode, authenticated users can read/write

#	files beginning with a dot ('.'). Anonymous users can't, for security reasons

#	(like changing banners or a forgotten .rhosts). When '-x' is used, authenticated

#	users can download dot-files, but not overwrite/create  them,  even  if they own

#	them. ]

# -X [ This  flag  is  identical  to  the  previous one (writing

#       dot-files is prohibited), but in addition, users can't even *read* files and

#       directories beginning with a dot (like "cd .ssh"). ]

# -D [ List files beginning with a dot ('.') even when the client doesn't

#      append the '-a' option to the list command. A workaround for badly

#      configured FTP clients. ]

# -G [ Disallow renaming. ]

# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ]

# -F <fortune file> [ Display a fortune cookie on login. Check the README file ]

# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ]

----------

## Sub Zero

Which user are you using to connect too? And I'd try to enable the logging in the config file. So you can at least see what's happening.

----------

## Biffen

 *Sub Zero wrote:*   

> Which user are you using to connect too? And I'd try to enable the logging in the config file. So you can at least see what's happening.

 

Hi, ne1 knows how to get 2 daemons on the same server with different config files? I currently uses pure-ftpd for local ftp transfers with mysql support. I like to install another daemon with lpuredb support (separate users), force ssl for external users to connect. So.... how do I configure the second daemon to use other configfile then /etc/conf.d/pureftpd?

Greets,

Biffen

----------

## philltx

i'm using a system user (phill) to connect to it.  the user phill is also an entry in the mysql database as well with the same password.  

I'm assuming the file is logging into the directory /var/log/ftpd/ 

Here are its contents under the log called 'current' 

```
webserver01 ftpd # cat current

Nov  1 04:48:30 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 04:48:30 [pure-ftpd] (?@10.200.39.204) [ERROR] Unable to set up secure anonymous FTP

Nov  1 04:48:51 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 04:48:51 [pure-ftpd] (?@10.200.39.204) [ERROR] Unable to set up secure anonymous FTP

Nov  1 04:49:35 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 04:49:35 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 04:50:03 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 04:50:03 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 05:30:11 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 05:30:11 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 05:30:51 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 05:30:51 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 05:32:55 [pure-ftpd] (?@?) [ERROR] Unable to start a standalone server: [Illegal seek]

Nov  1 05:33:05 [pure-ftpd] (?@?) [ERROR] Unable to start a standalone server: [Illegal seek]

                - Last output repeated twice -

Nov  1 05:33:54 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 05:33:54 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 05:33:59 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 05:33:59 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 05:37:03 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  1 05:37:09 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 05:37:40 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  1 05:37:44 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 06:09:32 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  1 06:09:32 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 06:10:21 [pure-ftpd] (?@?) [ERROR] Unable to start a standalone server: [Illegal seek]

                - Last output repeated twice -

Nov  1 06:16:31 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  1 06:16:34 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 06:32:08 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  1 06:32:13 [pure-ftpd] PAM-listfile: Couldn't open /etc/ftpusers

Nov  1 06:33:43 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  1 06:33:47 [pure-ftpd] PAM-listfile: /etc/ftpusers is either world writable or not a normal file

Nov  2 03:17:54 [pure-ftpd] (?@?) [ERROR] Unable to start a standalone server: [Illegal seek]

                - Last output repeated twice -

Nov  2 03:46:58 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  2 03:47:03 [pure-ftpd] PAM-listfile: /etc/ftpusers is either world writable or not a normal file

Nov  2 04:21:10 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  2 04:21:17 [pure-ftpd] PAM-listfile: /etc/ftpusers is either world writable or not a normal file

Nov  2 04:22:28 [pure-ftpd] (?@localhost) [INFO] New connection from localhost

Nov  2 04:22:34 [pure-ftpd] PAM-listfile: /etc/ftpusers is either world writable or not a normal file

Nov  2 04:22:36 [pure-ftpd] (?@localhost) [WARNING] Authentication failed for user [phill]

Nov  2 04:25:17 [pure-ftpd] (?@localhost) [INFO] Logout.

Nov  2 04:26:06 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  2 04:26:06 [pure-ftpd] (?@10.200.39.204) [ERROR] Unable to set up secure anonymous FTP

Nov  2 04:26:27 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  2 04:26:27 [pure-ftpd] (?@10.200.39.204) [ERROR] Unable to set up secure anonymous FTP

Nov  2 04:27:05 [pure-ftpd] (?@10.200.39.204) [INFO] New connection from 10.200.39.204

Nov  2 04:27:05 [pure-ftpd] PAM-listfile: /etc/ftpusers is either world writable or not a normal file

Nov  2 04:27:08 [pure-ftpd] (?@10.200.39.204) [WARNING] Authentication failed for user [phill]

Nov  2 04:27:14 [pure-ftpd] (?@10.200.39.204) [INFO] Logout.
```

----------

## Sub Zero

Hi,

Run pureftpd with the following command, Mind the -d for debug

```
pure-ftpd -S 21 -c 30 -C 10 -k 95% -N -l unix -A -E -x -j -Z -d
```

This will run the ftp server in debug mode without the MySQL users (if you want this, you need to specify another -l mysql:blabla). Now you can really see what's happening. And while you're at it:

```
touch /etc/ftpusers
```

----------

