# proftpd not working after upgrade

## neil55

Hello,

I'm having some trouble with my proftpd installation. Everything with proftpd was working fine and dandy for several years, until my most recent emerge update (sync, portage, system, world). For some reason, proftpd works fine when logging in with users found in /etc/passwd, but it refuses to allow login for users in AuthUserFiles for virtual hosts. This worked perfectly fine leading up to the upgrade, but has stopped working. Here's some details:

```

mycomp:~ neil$ ftp domain.com

Connected to domain.com.

220 Welcome to domain

Name (domain.com:neil): adi

331 Password required for adi

Password:

530 Login incorrect.

ftp: Login failed.

ftp> 

```

Here's the corresponding output in /var/log/messages:

```

Jun 13 16:30:15 serv proftpd[8921]: www.domain.com (mycomp.com) - mod_auth_file/0.8.3: found AuthUserFile '/usr/local/proftpd/users/domain'

Jun 13 16:30:15 serv proftpd[8921]: www.domain.com (mycomp.com) - FTP session opened.

Jun 13 16:30:18 serv proftpd[8921]: www.domain.com (mycomp.com) - mod_auth_file/0.8.3: af_setpwent: opening AuthUserFile '/usr/local/proftpd/users/domain'

Jun 13 16:30:20 serv proftpd[8921]: www.domain.com (mycomp.com) - mod_auth_file/0.8.3: af_setpwent: opening AuthUserFile '/usr/local/proftpd/users/domain'

Jun 13 16:30:20 serv ftp(pam_unix)[8921]: check pass; user unknown

Jun 13 16:30:20 serv ftp(pam_unix)[8921]: authentication failure; logname= uid=0 euid=0 tty= ruser=adi rhost=mycomp.com 

Jun 13 16:30:22 serv proftpd[8921]: www.domain.com (mycomp.com) - USER adi (Login failed): Incorrect password.

```

Here's the important parts of my proftpd.conf file:

```

ServerName                      "server.com"

ServerType                      standalone

DefaultServer                   on

ServerAdmin                     webmaster@server.com

TimeoutIdle                     999

TimeoutNoTransfer               999

<Global>

# Temporary fix to the recent DOS findings on BugTraq

DenyFilter \*.*/

#

TimesGMT                        off

RequireValidShell               off

Umask                           022

ServerIdent                     on "Welcome to server"

AllowOverwrite                  on

# LsDefaultOptions: deprecated. Use ListOptions instead

# LsDefaultOptions              "-al"

ListOptions             "-a"

DeferWelcome                    on

MaxClientsPerHost 3

MaxClients 25

RLimitOpenFiles 64

DefaultRoot                     ~

MaxLoginAttempts                3

Rootlogin                       off

IdentLookups                    off

</Global>

Port                            21

MaxInstances                    30

MaxConnectionRate 2

# Set the user and group that the server normally runs at.

User                            proftpd

Group                           proftpd

# Normally, we want files to be overwriteable.

<Directory /*>

AllowOverwrite                on

</Directory>

# 

# Virtual Host for domain.com

#

<VirtualHost my.ip.address>

AuthUserFile /usr/local/proftpd/users/domain

TransferLog /var/log/httpd/users/domain/xfer_log

</VirtualHost>

```

The contents of /usr/local/proftpd/users/domain:

adi:password removed:1017:100::/home/domain/public_html:/bin/false

and the contents of the user in /etc/passwd:

domain:x:1017:100:Domain Name:/home/domain:/bin/bash

Doesn't make any sense to me why this isn't working. It worked perfectly fine before the upgrade, and now it isn't. The permissions look fine on the /usr/local/proftpd/users/domain file. They are the same as they were before:

-rw-------    1 proftpd  proftpd       305 Jun 13 16:20 /usr/local/proftpd/users/domain

Can anyone shed any light here at all? Any help would really be appreciated. It's so frustrating when things like this work, you update, and then they break. Hopefully I can get this solved.

----------

## RemcoNL

Same problem here, I just found out proftpd isn't working anymore... No idea how to fix it though  :Sad: 

----------

## RemcoNL

From https://forums.gentoo.org/viewtopic-t-565362-highlight-proftpd.html : *RaZoR1394 wrote:*   

> Enable AuthPAM in your proftpd.conf.
> 
>  *Quote:*   
> 
> AuthPAM                         on
> ...

 

----------

## jbiz

Hi All,

I'm having an issue after upgrading proftpd to 1.3.1rc2 from 1.2.10.  The SQL Auth appears to not be working.  It was working previously until this latest update not only installed a new version of proftpd but also mysql.

Any assistance would be much appreciated.  I am not savvy with Gentoo at all (more of a debian/Ubuntu guy), but inherited the maintenance of this box from an engineer who no longer is with our company.

Here's the output from proftpd debug level 10:

```

Jun 17 11:04:08 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - connected - remote : 127.0.0.1:36575

Jun 17 11:04:08 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - FTP session opened.

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'AUTH SSL' to mod_tls

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'AUTH SSL' to mod_core

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'AUTH SSL' to mod_core

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching CMD command 'AUTH SSL' to mod_tls

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching POST_CMD_ERR command 'AUTH SSL' to mod_sql

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'AUTH SSL' to mod_sql

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'AUTH SSL' to mod_log

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER jeff' to mod_tls

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER jeff' to mod_core

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER jeff' to mod_core

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER jeff' to mod_delay

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER jeff' to mod_auth

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER jeff' to mod_ratio

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER jeff' to mod_auth

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - no supplemental groups found for user 'jeff'

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER jeff' to mod_sql

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER jeff' to mod_delay

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER jeff' to mod_sql

Jun 17 11:04:09 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER jeff' to mod_log

Jun 17 11:04:10 dns01 proftpd[10624]: my.host.com - ROOT PRIVS at mod_ctrls.c:1180

Jun 17 11:04:10 dns01 proftpd[10624]: my.host.com - RELINQUISH PRIVS at mod_ctrls.c:1184

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_sql

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - no supplemental groups found for user 'jeff'

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching CMD command 'PASS (hidden)' to mod_auth

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - retrieved UID 81 for user 'jeff'

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - USER jeff (Login failed): No such user found.

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_sql

Jun 17 11:04:11 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_sql

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_tls

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_core

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_core

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching CMD command 'SYST' to mod_core

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'SYST' to mod_sql

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'SYST' to mod_sql

Jun 17 11:04:14 dns01 proftpd[10667]: my.host.com (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'SYST' to mod_log

```

I've enabled SQLLogFile.  The output is:

```

Jun 17 10:54:13 mod_sql/4.2.2[10448]: <<< sql_sess_init

Jun 17 10:54:15 mod_sql/4.2.2[10448]: >>> sql_pre_pass

Jun 17 10:54:15 mod_sql/4.2.2[10448]: <<< sql_pre_pass

Jun 17 10:54:15 mod_sql/4.2.2[10448]: >>> cmd_getpwnam

Jun 17 10:54:15 mod_sql/4.2.2[10448]: entering  mysql cmd_escapestring

Jun 17 10:54:15 mod_sql/4.2.2[10448]: exiting   mysql cmd_escapestring

Jun 17 10:54:15 mod_sql/4.2.2[10448]: cache miss for user 'jeff'

Jun 17 10:54:15 mod_sql/4.2.2[10448]: : entering        mysql cmd_select

Jun 17 10:54:15 mod_sql/4.2.2[10448]: entering  mysql cmd_open

Jun 17 10:54:16 mod_sql/4.2.2[10448]: connection 'default' count is now 2

Jun 17 10:54:16 mod_sql/4.2.2[10448]: exiting   mysql cmd_open

Jun 17 10:54:16 mod_sql/4.2.2[10448]: query "SELECT userid, passwd, homedir FROM usertable WHERE (userid='jeff') AND ((login = '1')) LIMIT 1"

Jun 17 10:54:16 mod_sql/4.2.2[10448]: entering  mysql cmd_close

Jun 17 10:54:16 mod_sql/4.2.2[10448]: connection 'default' count is now 1

Jun 17 10:54:16 mod_sql/4.2.2[10448]: exiting   mysql cmd_close

Jun 17 10:54:16 mod_sql/4.2.2[10448]: exiting   mysql cmd_select

Jun 17 10:54:16 mod_sql/4.2.2[10448]: cache miss for user 'jeff'

Jun 17 10:54:16 mod_sql/4.2.2[10448]: user 'jeff' cached

Jun 17 10:54:16 mod_sql/4.2.2[10448]: + pwd.pw_name  : jeff

Jun 17 10:54:16 mod_sql/4.2.2[10448]: + pwd.pw_uid   : 81

Jun 17 10:54:16 mod_sql/4.2.2[10448]: + pwd.pw_gid   : 81

Jun 17 10:54:16 mod_sql/4.2.2[10448]: + pwd.pw_dir   : /network/ftp/jeff

Jun 17 10:54:16 mod_sql/4.2.2[10448]: + pwd.pw_shell :

Jun 17 10:54:16 mod_sql/4.2.2[10448]: <<< cmd_getpwnam

Jun 17 10:54:16 mod_sql/4.2.2[10448]: >>> cmd_auth

Jun 17 10:54:16 mod_sql/4.2.2[10448]: entering  mysql cmd_escapestring

Jun 17 10:54:16 mod_sql/4.2.2[10448]: exiting   mysql cmd_escapestring

Jun 17 10:54:16 mod_sql/4.2.2[10448]: cache hit for user 'jeff'

Jun 17 10:54:16 mod_sql/4.2.2[10448]: <<< cmd_auth

Jun 17 10:54:17 mod_sql/4.2.2[10448]: entering  mysql cmd_exit

Jun 17 10:54:17 mod_sql/4.2.2[10448]: entering  mysql cmd_close

Jun 17 10:54:17 mod_sql/4.2.2[10448]: connection 'default' closed

Jun 17 10:54:17 mod_sql/4.2.2[10448]: connection 'default' count is now 0

Jun 17 10:54:17 mod_sql/4.2.2[10448]: exiting   mysql cmd_close

Jun 17 10:54:17 mod_sql/4.2.2[10448]: exiting   mysql cmd_exit

```

proftpd.conf:

```

ServerType          standalone

DefaultServer       on

RequireValidShell   off

AuthPAM             off

AuthPAMConfig       ftp

# Port 21 is the standard FTP port.

Port                            21

# Display

DisplayConnect  /etc/proftpd/ftp.motd

# Umask 022 is a good standard umask to prevent new dirs and files

# from being group and world writable.

Umask                           022

# To prevent DoS attacks, set the maximum number of child processes

# to 30.  If you need to allow more than 30 concurrent connections

# at once, simply increase this value.  Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit maximum number of processes per service

# (such as xinetd).

MaxInstances                    30

# Set the user and group under which the server will run.

User                            root

Group                           root

DefaultRoot ~

# DNS resolution

UseReverseDNS           off

# Ident Lookups

IdentLookups            off

# Normally, we want files to be overwriteable.

<Directory /*>

  AllowOverwrite                on

</Directory>

#

# Logging options

#

TransferLog                     /var/log/proftpd.xferlog

# Some logging formats

#

LogFormat            default "%h %l %u %t \"%r\" %s %b"

# Paranoia logging level....

ExtendedLog                     /var/log/proftpd.paranoid_log  ALL default

<global>

 SQLHomedirOnDemand             on

 SQLBackend                     mysql

 SQLAuthTypes                   Backend

 SQLAuthenticate                users

 SQLConnectInfo                 proftpd@localhost root

 SQLDefaultGID                  81

 SQLDefaultUID                  81

 SQLMinUserGID                  100

 SQLMinUserUID                  500

 SQLUserInfo                    usertable userid passwd NULL NULL homedir NULL

 SQLUserWhereClause             "login = '1'"

 SQLLogFile                     /var/log/proftpd-sql.log

 Umask                          022

</global>

```

----------

## OldTango

 *RemcoNL wrote:*   

> Enable AuthPAM in your proftpd.conf.
> 
>  *Quote:*   
> 
> AuthPAM                         on
> ...

 This solved my very problem.  The recent upgrade left me not being able to log in as any user.

Thanks, its working again.............  :Smile:   :Smile:   :Smile: 

----------

## chebe

Well it seems, that we're not the only ones to have a problem with this !

Portage is downgrading to previous version ...

[D] net-ftp/proftpd

     Available versions:  1.3.1_rc2 1.3.1_rc2-r1

     Installed versions:  1.3.1_rc2-r2

And in the changelogs for rc2 ...

1.3.1rc2

---------

  + Bugfixes:

    Fixed mod_sql's mishandling of WHERE clauses.  This was causing

    problems with mod_sql-based authentication, and errors containing

    "{UNKNOWN TAG}" to appear in the SQLLogFile.

----------

## maestro

I have exactly the same problem with mysql authentication in proftpd 1.3.1_rc2-r2. No interesting log messages. SQL query returns a valid result for the user logging in, but i still get 530.

----------

## jbiz

I managed to get the authentication to work by installing a patch that I found here: https://bugs.gentoo.org/show_bug.cgi?id=181712

However, now I'm having issues with Binary transfers.

I can transfer a file in Ascii mode:

```

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'TYPE A' to mod_tls

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'TYPE A' to mod_core

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'TYPE A' to mod_core

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching CMD command 'TYPE A' to mod_xfer

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'TYPE A' to mod_sql

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'TYPE A' to mod_sql

Jun 19 08:58:52 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'TYPE A' to mod_log

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'PORT 172,20,0,23,11,173' to mod_tls

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'PORT 172,20,0,23,11,173' to mod_core

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'PORT 172,20,0,23,11,173' to mod_core

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching CMD command 'PORT 172,20,0,23,11,173' to mod_core

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - in dir_check_full(): path = '/', fullpath = '/net/ftp/lbftp/users/jeff/'.

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'PORT 172,20,0,23,11,173' to mod_sql

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'PORT 172,20,0,23,11,173' to mod_sql

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'PORT 172,20,0,23,11,173' to mod_log

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_tls

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_core

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_core

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_ratio

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_xfer

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - in dir_check_full(): path = '/wrar36b2.exe', fullpath = '/net/ftp/lbftp/users/jeff/wrar36b2.exe'.

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching CMD command 'RETR wrar36b2.exe' to mod_xfer

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - ROOT PRIVS at inet.c:329

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - ROOT PRIVS: ID switching disabled

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - PRIVS_RELINQUISH: ID switching disabled

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - UseReverseDNS off, returning IP address instead of DNS name

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - active data connection opened - local  : 10.5.99.175:20

Jun 19 08:59:01 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - active data connection opened - remote : 172.20.0.23:2989

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'RETR wrar36b2.exe' to mod_sql

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'RETR wrar36b2.exe' to mod_sql

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'RETR wrar36b2.exe' to mod_ratio

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'RETR wrar36b2.exe' to mod_xfer

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'RETR wrar36b2.exe' to mod_sql

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'RETR wrar36b2.exe' to mod_log

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'RETR wrar36b2.exe' to mod_xfer

Jun 19 08:59:03 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - Transfer completed: 1033440 bytes in 1.54 seconds

```

Binary mode throws an error regarding sendfile():

```

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'TYPE I' to mod_tls

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'TYPE I' to mod_core

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'TYPE I' to mod_core

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching CMD command 'TYPE I' to mod_xfer

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'TYPE I' to mod_sql

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'TYPE I' to mod_sql

Jun 19 08:59:10 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'TYPE I' to mod_log

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'PORT 172,20,0,23,11,174' to mod_tls

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'PORT 172,20,0,23,11,174' to mod_core

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'PORT 172,20,0,23,11,174' to mod_core

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching CMD command 'PORT 172,20,0,23,11,174' to mod_core

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - in dir_check_full(): path = '/', fullpath = '/net/ftp/lbftp/users/jeff/'.

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD command 'PORT 172,20,0,23,11,174' to mod_sql

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'PORT 172,20,0,23,11,174' to mod_sql

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD command 'PORT 172,20,0,23,11,174' to mod_log

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_tls

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_core

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_core

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_ratio

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching PRE_CMD command 'RETR wrar36b2.exe' to mod_xfer

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - in dir_check_full(): path = '/wrar36b2.exe', fullpath = '/net/ftp/lbftp/users/jeff/wrar36b2.exe'.

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching CMD command 'RETR wrar36b2.exe' to mod_xfer

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - ROOT PRIVS at inet.c:329

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - ROOT PRIVS: ID switching disabled

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - PRIVS_RELINQUISH: ID switching disabled

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - UseReverseDNS off, returning IP address instead of DNS name

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - active data connection opened - local  : 10.5.99.175:20

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - active data connection opened - remote : 172.20.0.23:2990

```

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - error using sendfile(): [75] Value too large for defined data type

```

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - Transfer aborted after 0 bytes in 0.00 seconds

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - notice: user jeff: aborting transfer: No such file or directory

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching POST_CMD_ERR command 'RETR wrar36b2.exe' to mod_sql

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD_ERR command 'RETR wrar36b2.exe' to mod_sql

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD_ERR command 'RETR wrar36b2.exe' to mod_log

Jun 19 08:59:14 hostname proftpd[13949]: my.host.com (172.20.0.23[172.20.0.23]) - dispatching LOG_CMD_ERR command 'RETR wrar36b2.exe' to mod_xfer

```

----------

## JamieWolf

@jbiz 

Try 

```
UseSendfile off
```

I had this problem with an old kernel, after updateing to the latest it worked. 

But lately I've seen this problem more often inf lists and forums. Hope this helps ya.

And now my problem.

I also have trouble with users loging in

```
server (192.168.100.3) - ROOT PRIVS at main.c:872

server (192.168.100.3) - SETUP PRIVS at main.c:877

server (192.168.100.3) - FTP session requested from unknown class

server (192.168.100.3) - performing module session initializations

server (192.168.100.3) - mod_sql/4.2.2: defaulting to 'mysql' backend

server (192.168.100.3) - mod_log: opening ExtendedLog '/var/log/proftpd.paranoid_log'

server (192.168.100.3) - ROOT PRIVS at mod_log.c:1230

server (192.168.100.3) - RELINQUISH PRIVS at mod_log.c:1232

server (192.168.100.3) - mod_log: opening ExtendedLog '/var/log/proftpd.auth_log'

server (192.168.100.3) - ROOT PRIVS at mod_log.c:1230

server (192.168.100.3) - RELINQUISH PRIVS at mod_log.c:1232

server (192.168.100.3) - mod_log: opening ExtendedLog '/var/log/proftpd.access_log'

server (192.168.100.3) - ROOT PRIVS at mod_log.c:1230

server (192.168.100.3) - RELINQUISH PRIVS at mod_log.c:1232

server (192.168.100.3) - ROOT PRIVS at mod_auth.c:150

server (192.168.100.3) - opening scoreboard '/var/run/proftpd/proftpd.scoreboard'

server (192.168.100.3) - RELINQUISH PRIVS at mod_auth.c:152

server (192.168.100.3) - AuthOrder in effect, resetting auth module order

server (192.168.100.3) - ident lookup disabled

server (192.168.100.3) - connected - local  : 192.168.100.1:21

server (192.168.100.3) - connected - remote : 192.168.100.3:55835

server (192.168.100.3) - FTP session opened.

server (192.168.100.3) - dispatching PRE_CMD command 'USER myuser' to mod_tls

server (192.168.100.3) - dispatching PRE_CMD command 'USER myuser' to mod_core

server (192.168.100.3) - dispatching PRE_CMD command 'USER myuser' to mod_core

server (192.168.100.3) - dispatching PRE_CMD command 'USER myuser' to mod_delay

server (192.168.100.3) - dispatching PRE_CMD command 'USER myuser' to mod_auth

server (192.168.100.3) - dispatching CMD command 'USER myuser' to mod_ratio

server (192.168.100.3) - dispatching CMD command 'USER myuser' to mod_auth

server (192.168.100.3) - retrieved group IDs: 10002, 10002

server (192.168.100.3) - retrieved group names: techhunter, techhunter

server (192.168.100.3) - dispatching POST_CMD command 'USER myuser' to mod_sql

server (192.168.100.3) - dispatching POST_CMD command 'USER myuser' to mod_delay

server (192.168.100.3) - dispatching LOG_CMD command 'USER myuser' to mod_sql

server (192.168.100.3) - dispatching LOG_CMD command 'USER myuser' to mod_log

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_sql

server (192.168.100.3) - retrieved group IDs: 10002, 10002

server (192.168.100.3) - retrieved group names: techhunter, techhunter

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay

server (192.168.100.3) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth

server (192.168.100.3) - dispatching CMD command 'PASS (hidden)' to mod_auth

server (192.168.100.3) - retrieved UID 10002 for user 'myuser'

server (192.168.100.3) - USER myuser (Login failed): No such user found.

server (192.168.100.3) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_sql

server (192.168.100.3) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay

server (192.168.100.3) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_sql

server (192.168.100.3) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log

server (192.168.100.3) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth

server (192.168.100.3) - FTP session closed.

```

server (192.168.100.3) - USER myuser (Login failed): No such user found.

I checked the SQL queries and they return a user ... so what the heck?

----------

## JamieWolf

My bug is also related to the one jbiz reported.

To solve this, disable the USE flag pam if you don't need it.

Greetingz

JamieWolf

----------

## geforce

and add [Solved] to the post name  :Razz: 

----------

## jbiz

Thanks JamieWolf, that fixed the binary transfer issue.

Too bad it took that long, cause now we're migrating everything to WSFTP   :Embarassed: 

----------

