Page 1 of 1

ProFTPD Login Issues

PostPosted: 30. October 2005 23:07
by nathanb
Hi everyone, I have a small issue with the ProFTPD Server in XAMPP.

Let me explain my situation:

I can log in using the linux system users (nathan, parkside) and using the FTP DefaultRoot "~" I can get to their home directories just fine when connecting to the server from within my LAN (IP 192.168.0.101 for example).

User nobody gives me / for the root directory, which is fine since I don't plan on using that anymore anyway.

But, here is my problem. When I try to connect to the server from outside my LAN (using a domain name or WAN IP) I can log in just fine for the system accounts, but when the FTP client send the command to list the files in /, the server closes the connection. This is only when connecting through the internet - it works perfectly when connecting through the LAN.

Now, here is the odd part: When I login as "nobody" through the internet it works as expected.

Any ideas?

PostPosted: 30. October 2005 23:18
by Wiedmann
can log in just fine for the system accounts, but when the FTP client send the command to list the files in /, the server closes the connection.

Use passive ftp in your client.

PostPosted: 30. October 2005 23:25
by nathanb
Wiedmann wrote:
can log in just fine for the system accounts, but when the FTP client send the command to list the files in /, the server closes the connection.

Use passive ftp in your client.

I've tried it with passive FTP enabled and disabled, both have the same result.

Or.. hmm what ports may I need to open in order to use passive FTP? That may be my problem.

PostPosted: 30. October 2005 23:31
by Wiedmann
Or.. hmm what ports may I need to open in order to use passive FTP?

On the server side passive FTP uses:
- incomming control connection on port 21
- incomming data connection on a random port above 1024

PostPosted: 31. October 2005 00:37
by nathanb
Hmm, this can't be a problem with ports. The user 'nobody' works via WAN and LAN, but nathan & parkside (system users) only work via LAN.

Here's what happens when trying to login with a system user over WAN:
Code: Select all
Remote server is running ProFTPD.
220: ProFTPD 1.2.10 Server (ProFTPD) [192.168.0.101]
Connected to home.nathanbolender.com.
Cmd: USER parkside
331: Password required for parkside.
Cmd: PASS xxxxxxxx
230: User parkside logged in.
Logged in to home.nathanbolender.com as parkside.
Cmd: SYST
215: UNIX Type: L8
Cmd: PWD
257: "/" is current directory.
Cmd: CWD /
250: CWD command successful
Cmd: PWD
257: "/" is current directory.
Cmd: PASV
227: Entering Passive Mode (69,61,240,244,246,122).
Cmd: LIST -a
Remote host has closed the connection.

But when using the user 'nobody' it works fine:
Code: Select all
Remote server is running ProFTPD.
220: ProFTPD 1.2.10 Server (ProFTPD) [192.168.0.101]
Connected to home.nathanbolender.com.
Cmd: USER nobody
331: Password required for nobody.
Cmd: PASS xxxxxxxx
230: User nobody logged in.
Logged in to home.nathanbolender.com as nobody.
Cmd: SYST
215: UNIX Type: L8
Cmd: PWD
257: "/" is current directory.
Cmd: PASV
227: Entering Passive Mode (69,61,240,244,246,112).
Cmd: LIST -a
150: Opening ASCII mode data connection for file list
226: Transfer complete.
drwxr-xr-x  22 root     root         4096 Oct 21 20:41 .
drwxr-xr-x  22 root     root         4096 Oct 21 20:41 ..
-rw-r--r--   1 root     root            0 Oct 21 20:41 .autofsck
-rw-r--r--   1 root     root        26259 Oct 15 23:26 .fonts.cache-1
drwxr-xr-x   2 root     root         4096 Oct 16 00:32 bin
[...]

PostPosted: 31. October 2005 03:46
by nathanb
Alright, looks like I fixed it. Thanks anyway.

Since I hate searching for an answer and seeing someone solve the problem without saying HOW, here's how I did it.

In proftpd.conf, I added the DefaultAddress directive.

More info here: http://www.proftpd.org/docs/directives/ ... dress.html

PostPosted: 31. October 2005 04:04
by krelvinaz
I'm surprised you have changed your system to allow the nobody user access.

Normally, the nobody user is locked and not allowed to login. One of the purposes of having it be nobody in the first place.