I am mucking with prftpd & mysql. the service runs fine. When I try to connect, however, things go bonkers. What did I do wrong? you will see at the end what happens when a connection is made.
if you try to connect:
ftp 192.168.0.8
you get
connected to 192.168.0.8
connection closed by remote host
#Here is our complete configuration file setup with MySQL and quota support. Keep a copy of the installation one in /usr/local/etc/ and replace with one like this - change to suit your ServerName and ServerAdmin.
ServerName "Server"
ServerType standalone
ServerAdmin
x@y.com
UseReverseDNS off
# Hide as much as possible to outside users
ServerIdent on "Welcome to the SDS FTP server. Please login..."
DeferWelcome off
DefaultServer on
# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart on
# Port 21 is the standard FTP port.
Port 21
# 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 nobody
Group nobody
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# Normally, we want files to be overwriteable.
AllowOverwrite on
<limit LOGIN>
order allow,deny
allow from all
deny from none
</limit>
# The passwords in MySQL are encrypted using CRYPT
SQLAuthTypes Plaintext Crypt
SQLAuthenticate users* groups*
# used to connect to the database
# databasename@host database_user user_password
SQLConnectInfo ftpdb@localhost **** ****
# Here we tell ProFTPd the names of the database columns in the "usertable"
# we want it to interact with. Match the names with those in the db
SQLUserInfo ftpuser userid passwd uid gid homedir shell
# Here we tell ProFTPd the names of the database columns in the "grouptable"
# we want it to interact with. Again the names match with those in the db
SQLGroupInfo ftpgroup groupname gid members
# set min UID and GID - otherwise these are 999 each
SQLMinID 500
# create a user's home directory on demand if it doesn't exist
SQLHomedirOnDemand on
# Update count every time user logs in
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser
# Update modified everytime user uploads or deletes a file
SQLLog STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser
# User quotas
# ===========
QuotaEngine off
QuotaDirectoryTally off
QuotaDisplayUnits Mb
QuotaShowQuotas on
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
RootLogin off
RequireValidShell off
################## END CONF ###################
Here is my log
- parsing '/usr/local/etc/proftpd.conf' configuration
- FS: using system open()
- FS: using system read()
- dispatching directive 'ServerName' to module mod_core
- dispatching directive 'ServerType' to module mod_core
- dispatching directive 'ServerAdmin' to module mod_core
- dispatching directive 'UseReverseDNS' to module mod_core
- dispatching directive 'ServerIdent' to module mod_core
- dispatching directive 'DeferWelcome' to module mod_core
- dispatching directive 'DefaultServer' to module mod_core
- dispatching directive 'AllowStoreRestart' to module mod_xfer
- dispatching directive 'Port' to module mod_core
- dispatching directive 'Umask' to module mod_core
- FS: using system read()
- dispatching directive 'MaxInstances' to module mod_core
- dispatching directive 'User' to module mod_core
- dispatching auth request "getpwnam" to module mod_sql
- dispatching auth request "getpwnam" to module mod_auth_file
- dispatching auth request "getpwnam" to module mod_auth_unix
- dispatching directive 'Group' to module mod_core
- dispatching auth request "getgrnam" to module mod_sql
- dispatching auth request "getgrnam" to module mod_auth_file
- dispatching auth request "getgrnam" to module mod_auth_unix
- dispatching directive 'DefaultRoot' to module mod_auth
- dispatching directive 'AllowOverwrite' to module mod_xfer
- dispatching directive '<Limit>' to module mod_core
- dispatching directive 'Order' to module mod_core
- dispatching directive 'Allow' to module mod_core
- dispatching directive 'Deny' to module mod_core
- dispatching directive '</Limit>' to module mod_core
- dispatching directive 'SQLAuthTypes' to module mod_sql
- dispatching directive 'SQLAuthenticate' to module mod_sql
- SQLAuthenticate: use of * in SQLAuthenticate has been deprecated. Use AuthOrder for setting authoritativeness
- SQLAuthenticate: use of * in SQLAuthenticate has been deprecated. Use AuthOrder for setting authoritativeness
- FS: using system read()
- dispatching directive 'SQLConnectInfo' to module mod_sql
- dispatching directive 'SQLUserInfo' to module mod_sql
- dispatching directive 'SQLGroupInfo' to module mod_sql
- dispatching directive 'SQLMinID' to module mod_sql
- dispatching directive 'SQLHomedirOnDemand' to module mod_sql
- dispatching directive 'SQLLog' to module mod_sql
- dispatching directive 'SQLNamedQuery' to module mod_sql
- dispatching directive 'SQLLog' to module mod_sql
- dispatching directive 'SQLNamedQuery' to module mod_sql
- dispatching directive 'QuotaEngine' to module mod_quotatab
- FS: using system read()
- dispatching directive 'QuotaDirectoryTally' to module mod_quotatab
- dispatching directive 'QuotaDisplayUnits' to module mod_quotatab
- dispatching directive 'QuotaShowQuotas' to module mod_quotatab
- dispatching directive 'SQLNamedQuery' to module mod_sql
- dispatching directive 'SQLNamedQuery' to module mod_sql
- dispatching directive 'SQLNamedQuery' to module mod_sql
- dispatching directive 'SQLNamedQuery' to module mod_sql
- FS: using system read()
- dispatching directive 'QuotaLimitTable' to module mod_quotatab
- dispatching directive 'QuotaTallyTable' to module mod_quotatab
- dispatching directive 'RootLogin' to module mod_auth
- dispatching directive 'RequireValidShell' to module mod_auth
- FS: using system read()
- FS: using system close()
delly -
delly - Config for Secure Data Systems Server:
delly - Limit
delly - Order
delly - Allow
delly - Deny
delly - ServerIdent
delly - DeferWelcome
delly - DefaultServer
delly - AllowStoreRestart
delly - Umask
delly - UserID
delly - UserName
delly - GroupID
delly - GroupName
delly - DefaultRoot
delly - AllowOverwrite
delly - SQLAuthTypes
delly - SQLAuthenticate
delly - SQLConnectInfo
delly - SQLUserTable
delly - SQLUsernameField
delly - SQLPasswordField
delly - SQLUidField
delly - SQLGidField
delly - SQLHomedirField
delly - SQLShellField
delly - SQLGroupTable
delly - SQLGroupnameField
delly - SQLGroupGIDField
delly - SQLGroupMembersField
delly - SQLMinID
delly - SQLHomedirOnDemand
delly - SQLLog_PASS
delly - SQLNamedQuery_updatecount
delly - SQLLog_STOR
delly - SQLLog_DELE
delly - SQLNamedQuery_modified
delly - QuotaEngine
delly - QuotaDirectoryTally
delly - QuotaDisplayUnits
delly - QuotaShowQuotas
delly - SQLNamedQuery_get-quota-limit
delly - SQLNamedQuery_get-quota-tally
delly - SQLNamedQuery_update-quota-tally
delly - SQLNamedQuery_insert-quota-tally
delly - QuotaLimitTable
delly - QuotaTallyTable
delly - RootLogin
delly - RequireValidShell
delly - dispatching auth request "getgroups" to module mod_sql
delly - dispatching auth request "getgroups" to module mod_auth_file
delly - dispatching auth request "getgroups" to module mod_auth_unix
delly - SETUP PRIVS at main.c:2733
delly - ROOT PRIVS at main.c:1967
delly - RELINQUISH PRIVS at main.c:1974
delly - ROOT PRIVS at main.c:2322
delly - opening scoreboard '/usr/local/var/proftpd/proftpd.scoreboard'
delly - RELINQUISH PRIVS at main.c:2348
delly - ROOT PRIVS at inet.c:322
delly - RELINQUISH PRIVS at inet.c:380
delly - ProFTPD 1.2.10 (stable) (built Wed Nov 24 09:06:25 EST 2004) standalone mode STARTUP
delly - ROOT PRIVS at main.c:2185
delly - RELINQUISH PRIVS at main.c:2187
delly - FS: using system lstat()
delly - ROOT PRIVS at main.c:1162
delly - RELINQUISH PRIVS at main.c:1166
delly (192.168.0.8[192.168.0.8]) - ROOT PRIVS at main.c:1011
delly (192.168.0.8[192.168.0.8]) - SETUP PRIVS at main.c:1016
delly (192.168.0.8[192.168.0.8]) - FTP session requested from unknown class
delly (192.168.0.8[192.168.0.8]) - performing module session initializations
delly - FS: using system lstat()
delly - FS: using system lstat()
delly (192.168.0.8[192.168.0.8]) - FTP session closed.