# Pureftp questions

## Jamesbch

Hello,

1/ I installed Pureftp on my gentoo a moment ago and I searched lots of time how to set a bigger limit of users. The limitation is 1 user and I tried -C and -c options but it won't work. Here is my /etc/conf.d/pureftpd file:

 *Quote:*   

> Server ~ # cat /etc/conf.d/pure-ftpd
> 
> # Config file for /etc/init.d/pure-ftpd
> 
> ##Comment variables out to disable its features, or change the values in it... ##
> ...

 

So I use special configuration file of gentoo for pureftp. All is working except this users limitation. Any idea how to fix it ?

(version : PureFTP 1.0.21-r1)

2/ My second question is what ports pureftp uses in active mode (so the client can *connect in passive mode). I opened 20 and 21 ports in iptables but it stucks at the listing of directory (Filezilla, gftp etc...) but with the ftp command line it works perfectly ! This problem is on Linux and Windows too.

Thank you in advance and escuse me for my bad english.Last edited by Jamesbch on Sun Mar 16, 2008 9:29 pm; edited 1 time in total

----------

## KayZee

For your second question, try adding -b to MISC_OTHER

 *Quote:*   

> '-b': Ignore parts of RFC standards in order to deal with some totally
> 
> broken FTP clients, or broken firewalls/NAT boxes.

 

I had to do this in order to get Internet Explorer to list any files.

----------

## Jamesbch

Thank you KayZee, it works like a charm ! 2/ Solved (So all ftp clients are broken except the original `ftp` client ?)

Any idea about 1/ ?

----------

## KayZee

I have not had problems with connection limits.  The only suggestions I can offer for troubleshooting are

1.)  Remove  *Quote:*   

> -p 49658:49659

  from MISC_OTHER.  Did you add that for troubleshooting the file display issue?  It may be causing some unexpected behavior.

2.) Any firewalls limiting connections?

----------

## Jamesbch

1/ You are right ! The -p option made limiting the number of users ! It's working now and I thank you very much for your help.

2/ But now don't work after ftp clients have done a LIST :

 *Quote:*   

> Command :	PASV
> 
> Answer :	227 Entering Passive Mode (xxx,xxx,x,x,49,108)
> 
> Command :	LIST

 

My iptable rules accept what I decided (ports: 20,21,22) and reject everything else. So when I disable iptable the FTP works fine.

Here is what I found with tcptrack :

 *Quote:*   

> # Before LIST (xxx.xxx.x.x = server ; xxx.xxx.x.y = client)
> 
>   Client                Server                State        Idle A Speed
> 
>  xxx.xxx.x.y:2395      xxx.xxx.x.x:22        ESTABLISHED  0s     11 KB/s
> ...

 

So it seems that a connection is open on a random port on the client and the server. (So iptable block it because it's a random port)

What can I do about that ?

Anyway that you very much KayZee.

----------

## KayZee

Port 22 is usually for ssh.  Not sure why an ftp client would be opening that port.

What does your MISC_OTHER look like now?  I note that in an earlier posts you had this

```

## Misc. Others ##

MISC_OTHER="50 -A -E -x -j -R -Z -p 49658:49659" 
```

The "50" makes no sense to pureftpd on this line.  I am guessing you have removed -p by now and added -b.

You may want to look at the documentation for pureftpd where a lot of options are described.

http://download.pureftpd.org/pub/pure-ftpd/doc/README

----------

## Jamesbch

Here is mine now:

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

I think that 50 was the number of clients with -c but I removed it now. The -b is here and -p removed.

The port 22 is my ssh as you said. The 21 port is open and works but a random port is opened every time the client ask for LIST so the firewall block it.

What can I do ? I think the probleme is the ports not the configuration of pureftp, isn't it ?

----------

## KayZee

It does seem like a firewall issue now and not pureftpd.  You will have to look through your firewall rules.

----------

## Jamesbch

Here is my configuration. I block what is not accepted here.

 *Quote:*   

> # fichier a faire manger par iptables et iptables save ensuite
> 
> # Generated by iptables-save v1.3.5 on Fri Aug 17 05:04:14 2007
> 
> *filter
> ...

 

Any idea ? What must I add to this file ?

----------

