Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have a very strange problem with Proftpd 1.3.0 (the problem appeared when it was 1.2.8, i upgraded but with no result) and Debian Etch
So here's the problem:
There was a thunderstorm and my server rebooted, ext3 and mysql recovered Ok
BUt proftpd apparently didnt
I used this tutorial to set up the server with mysql
when i run it with proftpd -nd6 and try to connect i get this
Code:
- mod_ctrls/0.9.4: binding ctrls socket to '/var/run/proftpd/proftpd.sock'
- parsing '/etc/proftpd/proftpd.conf' configuration
- parsing '/etc/proftpd/modules.conf' configuration
- dispatching auth request "name2uid" to module mod_auth_file
- dispatching auth request "name2uid" to module mod_auth_unix
- dispatching auth request "name2uid" to module mod_auth_file
- dispatching auth request "name2uid" to module mod_auth_unix
- mod_tls/2.1.1: using OpenSSL 0.9.8c 05 Sep 2006
- disabling runtime support for IPv6 connections
- DenyFilter: compiling deny regex '\*.*/'
- dispatching auth request "getpwnam" to module mod_radius
- dispatching auth request "getpwnam" to module mod_ldap
- 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 auth request "getgrnam" to module mod_radius
- dispatching auth request "getgrnam" to module mod_ldap
- 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
- <IfModule>: using 'mod_tls.c' section at line 73
- <IfModule>: skipping 'mod_quota.c' section at line 77
- <IfModule>: skipping 'mod_ratio.c' section at line 81
- <IfModule>: using 'mod_delay.c' section at line 89
- <IfModule>: using 'mod_ctrls.c' section at line 93
- mod_ctrls/0.9.4: closing ctrls socket '/var/run/proftpd/proftpd.sock' (3)
- <IfModule>: using 'mod_ctrls_admin.c' section at line 101
predator.adsl -
predator.adsl - Config for Debian:
[....]
predator.adsl - mod_ctrls/0.9.4: binding ctrls socket to '/var/run/proftpd/proftpd.sock'
predator.adsl - dispatching auth request "getgroups" to module mod_radius
predator.adsl - dispatching auth request "getgroups" to module mod_ldap
predator.adsl - dispatching auth request "getgroups" to module mod_sql
predator.adsl - dispatching auth request "getgroups" to module mod_auth_file
predator.adsl - dispatching auth request "getgroups" to module mod_auth_unix
predator.adsl - ProFTPD 1.3.0 (stable) (built Tue Nov 4 14:38:05 UTC 2008) standalone mode STARTUP
predator.adsl (192.168.1.5[192.168.1.5]) - FTP session requested from unknown class
predator.adsl (192.168.1.5[192.168.1.5]) - mod_delay/0.5: opening DelayTable '/var/run/proftpd/proftpd.delay'
predator.adsl (192.168.1.5[192.168.1.5]) - ident lookup disabled
predator.adsl (192.168.1.5[192.168.1.5]) - connected - local : 192.168.1.6:21
predator.adsl (192.168.1.5[192.168.1.5]) - connected - remote : 192.168.1.5:37910
predator.adsl (192.168.1.5[192.168.1.5]) - FTP session opened.
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'USER alex' to mod_rewrite
[.......]
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'USER alex' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'USER alex' to mod_log
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgroups" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgroups" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgroups" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgroups" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgroups" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endpwent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endpwent" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endpwent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endpwent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endpwent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endgrent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endgrent" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endgrent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endgrent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "endgrent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching CMD command 'PASS (hidden)' to mod_auth
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - stashed module 'mod_auth_unix.c' for user 'alex' in the authcache
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "gid2name" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "gid2name" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "gid2name" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - using module 'mod_auth_pam.c' to authenticate user 'alex'
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "auth" to module mod_auth_pam
predator.adsl (192.168.1.5[192.168.1.5]) - user alex authenticated by mod_auth_pam.c
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) -
predator.adsl (192.168.1.5[192.168.1.5]) - Config for Debian:
[........]
predator.adsl (192.168.1.5[192.168.1.5]) - CURRENT-CLIENTS
predator.adsl (192.168.1.5[192.168.1.5]) - USER
predator.adsl (192.168.1.5[192.168.1.5]) - USER alex: Login successful.
predator.adsl (192.168.1.5[192.168.1.5]) - opening TransferLog '/var/log/proftpd/xferlog'
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwnam" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - stashed module 'mod_auth_unix.c' for user 'alex' in the authcache
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setpwent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setpwent" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setpwent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setpwent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setpwent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_ldap
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "setgrent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getpwent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgrent" to module mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgrent" to module mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgrent" to module mod_auth_file
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching auth request "getgrent" to module mod_auth_unix
predator.adsl (192.168.1.5[192.168.1.5]) - Preparing to chroot to directory '/home/alex'
predator.adsl (192.168.1.5[192.168.1.5]) - Environment successfully chroot()ed.
predator.adsl (192.168.1.5[192.168.1.5]) - in dir_check_full(): path = '/', fullpath = '/home/alex/'.
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_ifsession
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_radius
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_quotatab
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_tls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_cap
predator.adsl (192.168.1.5[192.168.1.5]) - mod_cap/1.0: capabilities '= cap_net_bind_service+ep'
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_readme
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_delay
predator.adsl (192.168.1.5[192.168.1.5]) - mod_delay/0.5: selecting median interval from 10 values
predator.adsl (192.168.1.5[192.168.1.5]) - mod_delay/0.5: delaying for 2730111 usecs
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_log
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_ls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASS (hidden)' to mod_auth
predator.adsl (192.168.1.5[192.168.1.5]) - unable to display DisplayLogin file 'welcome.msg': No such file or directory
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'PASS (hidden)' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'PASS (hidden)' to mod_log
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PWD' to mod_rewrite
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PWD' to mod_tls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PWD' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PWD' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching CMD command 'PWD' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - in dir_check_full(): path = '/', fullpath = '/home/alex/'.
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PWD' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'PWD' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'PWD' to mod_log
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'TYPE I' to mod_rewrite
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'TYPE I' to mod_tls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'TYPE I' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'TYPE I' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching CMD command 'TYPE I' to mod_xfer
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'TYPE I' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'TYPE I' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'TYPE I' to mod_log
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASV' to mod_rewrite
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASV' to mod_tls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASV' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'PASV' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching CMD command 'PASV' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - in dir_check_full(): path = '/', fullpath = '/home/alex/'.
predator.adsl (192.168.1.5[192.168.1.5]) - Entering Passive Mode (192,168,1,6,10,44).
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching POST_CMD command 'PASV' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'PASV' to mod_sql
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching LOG_CMD command 'PASV' to mod_log
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'LIST' to mod_rewrite
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'LIST' to mod_tls
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'LIST' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching PRE_CMD command 'LIST' to mod_core
predator.adsl (192.168.1.5[192.168.1.5]) - dispatching CMD command 'LIST' to mod_ls
and nothing happens next....
i had to shorten the output a bit
While in the client i get this:
Команда: PWD
Отговор: 257 "/" is current directory.
Команда: TYPE I
Отговор: 200 Type set to I
Команда: PASV
Отговор: 227 Entering Passive Mode (192,168,1,6,10,44).
Команда: LIST
And the connection times out
everything was OK, i havent altered the configuretion
its running as standalone
Here is my /etc/proftpd/proftpd.conf:
Code:
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#
# Includes DSO modules
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off
ServerName "Debian"
ServerType standalone
DeferWelcome on
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayFirstChdir .message
ListOptions "-l"
DenyFilter \*.*/
UseReverseDNS off
IdentLookups off
# Port 21 is the standard FTP port.
Port 21
# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts 49152 65534
# 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 that the server normally runs at.
User proftpd
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd off
# Be warned: use of this directive impacts CPU average load!
#
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
# UseSendFile off
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
<IfModule mod_tls.c>
TLSEngine off
</IfModule>
<IfModule mod_quota.c>
QuotaEngine on
</IfModule>
<IfModule mod_ratio.c>
Ratios on
</IfModule>
# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine on
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>
# A basic anonymous configuration, no upload directories.
# <Anonymous ~ftp>
# User ftp
# Group nogroup
# # We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
# # Cosmetic changes, all files belongs to ftp user
# DirFakeUser on ftp
# DirFakeGroup on ftp
#
# RequireValidShell off
#
# # Limit the maximum number of anonymous logins
# MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayFirstChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
# <Directory *>
# <Limit WRITE>
# DenyAll
# </Limit>
# </Directory>
#
# # Uncomment this if you're brave.
# # <Directory incoming>
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # <Limit READ WRITE>
# # DenyAll
# # </Limit>
# # <Limit STOR>
# # AllowAll
# # </Limit>
# # </Directory>
#
# </Anonymous>
DefaultRoot ~
# 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 ftp@localhost proftpd [hidden]
# 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 on
QuotaDirectoryTally on
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
SQLNamedQuery gettally SELECT "ROUND((bytes_in_used/1048576),2) FROM ftpquotatallies WHERE name='%u'"
SQLNamedQuery getlimit SELECT "ROUND((bytes_in_avail/1048576),2) FROM ftpquotalimits WHERE name='%u'"
SQLNamedQuery getfree SELECT "ROUND(((ftpquotalimits.bytes_in_avail-ftpquotatallies.bytes_in_used)/1048576),2) FROM ftpquotalimits,ftpquotatallies WHERE ftpquotalimits.name = '%u' AND ftpquotatallies.name = '%u'"
SQLShowInfo LIST "226" "Used %{gettally}MB from %{getlimit}MB. You have %{getfree}MB available space."
Do i need to give any more information?
I am really stunned
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.