LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2004, 04:08 PM   #1
toddism
LQ Newbie
 
Registered: Nov 2004
Posts: 1

Rep: Reputation: 0
Proftpd - 421 connection closed


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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
proftpd error 421 DuPHaLaC Linux - Networking 0 11-03-2004 09:29 AM
421 Service not available error, ProFTPd (SuSE 9.1) neocookie Linux - Software 0 10-19-2004 11:41 AM
421 Service not available, remote server has closed connection dwarf007 Linux - Networking 1 10-09-2004 07:00 AM
error 421 with proftpd zhoubo2004 Linux - Networking 1 01-25-2004 10:38 PM
Pop3 connection closed Madrinator Linux - Networking 3 09-29-2003 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration