Hello.
I'm running a standalone ProFTPd server along with ISPCP.
Everything works fine, except for the statistics. In ISPCP all FTP stats are constantly showing 0 B. I don't know why it happens. I've checked the /etc/proftpd/proftpd.conf and /etc/ispcp/ispcp.conf to see whether the entries regarding log files (xferlog and ftp_traff.log) are pointing to exactly the same files, then I've checked under /var/log/proftpd/ - the files are there and they both show statistics. This looks like ISPCP doesn't know where to look for these stats although the FTP_TRAFF_LOG and TRAFF_LOG_DIR parameters are set correctly. I've even manually run all cron tasks for ispcp and still nothing.
Please help,
Martini
P.S.: This is my /etc/ispcp/ispcp.conf
Code:
# ispCP ω (OMEGA) a Virtual Hosting Control Panel
# Copyright (C) 2006-2010 by isp Control Panel - http://ispcp.net
#
# Version: $Id: ispcp.conf 3668 2010-11-24 21:29:19Z benedikt $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is "ispCP ω (OMEGA) a Virtual Hosting Control Panel".
#
# The Initial Developer of the Original Code is ispCP Team.
# Portions created by Initial Developer are Copyright (C) 2006-2010 by
# isp Control Panel. All Rights Reserved.
#
# The ispCP ω Home Page is:
#
# http://isp-control.net
#
#
# Misc config variables
#
BuildDate = 20101124
Version = 1.0.7 OMEGA
CodeName = Priamos
DistName = Debian
DEFAULT_ADMIN_ADDRESS = admin@witchermod.org
SERVER_HOSTNAME = server.witchermod.org
BASE_SERVER_IP = 10.0.0.6
BASE_SERVER_VHOST = server.witchermod.org
BASE_SERVER_VHOST_PREFIX = http://
MR_LOCK_FILE = /var/run/ispcp.lock
#
# File system variables
#
CMD_AWK = /usr/bin/awk
CMD_BZCAT = /bin/bzcat
CMD_BZIP = /bin/bzip2
CMD_CAT = /bin/cat
CMD_CHMOD = /bin/chmod
CMD_CHOWN = /bin/chown
CMD_CMP = /usr/bin/cmp
CMD_CP = /bin/cp
CMD_DF = /bin/df
CMD_DIFF = /usr/bin/diff
CMD_DU = /usr/bin/du
CMD_ECHO = /bin/echo
CMD_EGREP = /bin/egrep
CMD_GREP = /bin/grep
CMD_GROUPADD = /usr/sbin/groupadd
CMD_GROUPDEL = /usr/sbin/groupdel
CMD_GZCAT = /bin/zcat
CMD_GZIP = /bin/gzip
CMD_HOSTNAME = /bin/hostname
CMD_IFCONFIG = /sbin/ifconfig
CMD_IPTABLES = /sbin/iptables
CMD_LN = /bin/ln
CMD_LZMA = /usr/bin/lzma
CMD_MV = /bin/mv
CMD_MYSQL = /usr/bin/mysql
CMD_PHP = /usr/bin/php5
CMD_PS = /bin/ps
CMD_RM = /bin/rm
CMD_SED = /bin/sed
CMD_SHELL = /bin/sh
CMD_TAR = /bin/tar
CMD_TOUCH = /usr/bin/touch
CMD_USERADD = /usr/sbin/useradd
CMD_USERDEL = /usr/sbin/userdel
CMD_WC = /usr/bin/wc
CMD_XZ = /usr/bin/xz
PEAR_DIR = /usr/share/php
#
# SQL backend variables
#
# Don't change this one
DATABASE_TYPE = mysql
DATABASE_HOST = localhost
DATABASE_NAME = ispcp
DATABASE_PASSWORD = /Zez11CmMj4=
DATABASE_USER = root
DATABASE_DIR = /var/lib/mysql
CMD_MYSQLDUMP = /usr/bin/mysqldump
DATABASE_UTF8 = yes
#
# Main variables
#
CONF_DIR = /etc/ispcp
LOG_DIR = /var/log/ispcp
PHP_STARTER_DIR = /var/www/fcgi
ROOT_DIR = /var/www/ispcp
ROOT_USER = root
ROOT_GROUP = root
GUI_ROOT_DIR = /var/www/ispcp/gui
APACHE_WWW_DIR = /var/www/virtual
SCOREBOARDS_DIR = /var/www/scoreboards
# Select Zipping Algorithm for Backups
# Make sure the selected Algorithm is installed
# and tar command supports "--$ZIP" -> will mostly work with bzip2 & gzip
# Supported: gzip, bzip2, lzma, xz
ZIP = bzip2
#
# PHP FastCGI data
#
# Posible values: fcgid, fastcgi
PHP_FASTCGI = fcgid
PHP5_FASTCGI_BIN = /usr/bin/php5-cgi
PHP_VERSION = 5
PHP_TIMEZONE = Europe/Warsaw
#
# ProFTPd data
#
FTPD_CONF_FILE = /etc/proftpd/proftpd.conf
FTPD_CONF_DIR = /etc/proftpd/ispcp
#
# BIND data
#
BIND_CONF_FILE = /etc/bind/named.conf
BIND_DB_DIR = /var/cache/bind
SECONDARY_DNS =
#
# Resolver
#
RESOLVER_CONF_FILE = /etc/resolv.conf
LOCAL_DNS_RESOLVER = yes
#
# AWSTATS data
#
AWSTATS_ACTIVE = yes
# could be 'dynamic' = 0 or 'static' = 1
AWSTATS_MODE = 0
AWSTATS_CACHE_DIR = /var/cache/awstats
AWSTATS_CONFIG_DIR = /etc/awstats
AWSTATS_ENGINE_DIR = /usr/lib/cgi-bin
AWSTATS_WEB_DIR = /usr/share/awstats
AWSTATS_ROOT_DIR = /var/www/ispcp/engine/awstats
AWSTATS_GROUP_AUTH = statistics
#
# APACHE data
#
APACHE_NAME = apache2
APACHE_RESTART_TRY = 3
APACHE_CONF_DIR = /etc/apache2
APACHE_LOG_DIR = /var/log/apache2
APACHE_BACKUP_LOG_DIR = /var/log/apache2/backup
APACHE_USERS_LOG_DIR = /var/log/apache2/users
APACHE_MODS_DIR = /etc/apache2/mods-available
APACHE_SITES_DIR = /etc/apache2/sites-available
APACHE_CUSTOM_SITES_CONFIG_DIR = /etc/apache2/ispcp
APACHE_SUEXEC_USER_PREF = vu
APACHE_SUEXEC_MIN_GID = 2000
APACHE_SUEXEC_MAX_GID = 29999
APACHE_SUEXEC_MIN_UID = 2000
APACHE_SUEXEC_MAX_UID = 29999
APACHE_USER = www-data
APACHE_GROUP = www-data
#
# Postfix MTA Data
#
POSTFIX_CONF_FILE = /etc/postfix/main.cf
POSTFIX_MASTER_CONF_FILE = /etc/postfix/master.cf
MTA_LOCAL_MAIL_DIR = /var/mail
MTA_VIRTUAL_MAIL_DIR = /var/mail/virtual
MTA_LOCAL_ALIAS_HASH = /etc/aliases
MTA_VIRTUAL_CONF_DIR = /etc/postfix/ispcp
MTA_VIRTUAL_ALIAS_HASH = /etc/postfix/ispcp/aliases
MTA_VIRTUAL_DMN_HASH = /etc/postfix/ispcp/domains
MTA_VIRTUAL_MAILBOX_HASH = /etc/postfix/ispcp/mailboxes
MTA_TRANSPORT_HASH = /etc/postfix/ispcp/transport
MTA_SENDER_ACCESS_HASH = /etc/postfix/ispcp/sender-access
MTA_MAILBOX_MIN_UID = 1001
MTA_MAILBOX_UID = 1001
MTA_MAILBOX_UID_NAME = vmail
MTA_MAILBOX_GID = 8
MTA_MAILBOX_GID_NAME = mail
MTA_SASLDB_FILE = /var/spool/postfix/etc/sasldb2
ETC_SASLDB_FILE = /etc/sasldb2
CMD_SASLDB_LISTUSERS2 = /usr/sbin/sasldblistusers2
CMD_SASLDB_PASSWD2 = /usr/sbin/saslpasswd2
CMD_POSTMAP = /usr/sbin/postmap
CMD_NEWALIASES = /usr/bin/newaliases
#
# Postgrey data
#
PORT_POSTGREY = 10023
#
# Courier data
#
AUTHLIB_CONF_DIR = /etc/courier
CMD_MAKEUSERDB = /usr/sbin/makeuserdb
#
# Crontab delayed tasks
#
BACKUP_HOUR = 23
BACKUP_MINUTE = 40
# Tells whether the ispCP database and
# all /etc/ispcp/* files should be daily saved
BACKUP_ISPCP = yes
# Tells whether all the customers' data should be daily saved
# Saved data depend of the domain properties (dmn|sql|all)
BACKUP_DOMAINS = yes
BACKUP_ROOT_DIR = /var/www/ispcp/engine/backup
CMD_CRONTAB = /usr/bin/crontab
#
# Service manager
#
# Either no or path to the amavis-daemon (usually: /etc/init.d/amavis)
CMD_AMAVIS = no
CMD_AUTHD = /etc/init.d/courier-authdaemon
CMD_FTPD = /etc/init.d/proftpd
CMD_HTTPD_CTL = /usr/sbin/apache2ctl
CMD_HTTPD = /etc/init.d/apache2
CMD_IMAP = /etc/init.d/courier-imap
CMD_IMAP_SSL = no
CMD_POSTGREY = /etc/init.d/postrey
CMD_POLICYD_WEIGHT = /etc/init.d/policyd-weight
CMD_MTA = /etc/init.d/postfix
CMD_NAMED = /etc/init.d/bind9
CMD_POP = /etc/init.d/courier-pop
CMD_POP_SSL = no
CMD_ISPCPD = /etc/init.d/ispcp_daemon
CMD_ISPCPN = /etc/init.d/ispcp_network
#
# Virtual traffic manager
#
CMD_PFLOGSUM = /usr/sbin/maillogconvert.pl
TRAFF_LOG_DIR = /var/log
FTP_TRAFF_LOG = /proftpd/ftp_traff.log
MAIL_TRAFF_LOG = mail.log
TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic
TOOLS_ROOT_DIR = /var/www/ispcp/engine/tools
QUOTA_ROOT_DIR = /var/www/ispcp/engine/quota
#
# AMaViS data
#
MAIL_LOG_INC_AMAVIS = 0
#
# GUI config
#
USER_INITIAL_THEME = omega_original
FTP_USERNAME_SEPARATOR = @
FTP_HOMEDIR = /var/www/virtual
IPS_LOGO_PATH = ../themes/user_logos
ISPCP_SUPPORT_SYSTEM_PATH = ticket_system.php
ISPCP_SUPPORT_SYSTEM_TARGET =
MYSQL_PREFIX = no
# '' for MYSQL_PREFIX = no,
# 'infront' or 'behind' for MYSQL_PREFIX = yes
MYSQL_PREFIX_TYPE =
WEBMAIL_PATH = ../tools/webmail/
WEBMAIL_TARGET = _blank
# Please, do not change it manually
# This entry is used for the update/recovery process
PMA_USER = pma
PMA_PATH = /pma/
PMA_TARGET = _blank
FILEMANAGER_PATH = ../tools/filemanager/
FILEMANAGER_TARGET = _blank
DATE_FORMAT = d.m.Y
RKHUNTER_LOG = /var/log/rkhunter.log
CHKROOTKIT_LOG = /var/log/chkrootkit.log
# Here you can set an additional anti-rootkit tool log file
OTHER_ROOTKIT_LOG =
#
# htaccess management
#
HTACCESS_USERS_FILE_NAME = .htpasswd
HTACCESS_GROUPS_FILE_NAME = .htgroup
HTPASSWD_CMD = /usr/bin/htpasswd2
#
# backup management
#
BACKUP_FILE_DIR = /var/www/ispcp/backups
#
# Exception Writers Observers
#
# Availables Writers are:
# - Mail
#
# Note: Other writers will be added later
#
GUI_EXCEPTION_WRITERS = mail
#
# Debug Mode (e.g. for developers)
# options: 0 = off, 1 = on
#
DEBUG = 0
and my /etc/proftpd.conf
Code:
# ispCP ω (OMEGA) a Virtual Hosting Control Panel
# Copyright (C) 2001-2006 by moleSoftware GmbH - http://www.molesoftware.com
# Copyright (C) 2006-2010 by isp Control Panel - http://ispcp.net
#
# Version: $Id: proftpd.conf 3454 2010-10-14 19:39:50Z scitech $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is "VHCS - Virtual Hosting Control System".
#
# The Initial Developer of the Original Code is moleSoftware GmbH.
# Portions created by Initial Developer are Copyright (C) 2001-2006
# by moleSoftware GmbH. All Rights Reserved.
# Portions created by the ispCP Team are Copyright (C) 2006-2010 by
# isp Control Panel. All Rights Reserved.
#
# The ispCP ω Home Page is:
#
# http://isp-control.net
#
# Includes DSO modules (this is mandatory in proftpd 1.3)
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off
ServerName "Witchermod"
ServerType standalone
DeferWelcome off
ServerIdent on "Welcome to Witchermod FTP Service"
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
AllowOverwrite on
UseReverseDNS off
IdentLookups off
AllowStoreRestart on
AllowForeignAddress on
LogFormat traff "%b %u"
TimeoutLogin 120
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayChdir message
ListOptions "-l"
#LsDefaultOptions "-l"
DenyFilter \*.*/
DefaultRoot ~
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd 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 nobody
Group nogroup
# Normally, we want files to be overwriteable.
<Directory /*>
# 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
HideNoAccess on
</Directory>
<Limit ALL>
IgnoreHidden on
</Limit>
# 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
<Global>
RootLogin off
TransferLog /var/log/proftpd/xferlog
ExtendedLog /var/log/proftpd/ftp_traff.log read,write traff
PathDenyFilter "\.quota$"
</Global>
# Loading required modules
<IfModule !mod_sql.c>
LoadModule mod_sql.c
AuthOrder mod_sql.c
</IfModule>
<IfModule !mod_sql_mysql.c>
LoadModule mod_sql_mysql.c
</IfModule>
<IfModule !mod_quotatab.c>
LoadModule mod_quotatab.c
</IfModule>
<IfModule !mod_quotatab_sql.c>
LoadModule mod_quotatab_sql.c
</IfModule>
#
# SSL via TLS
#
#<IfModule mod_tls.c>
# TLSEngine off # on for use of TLS
# TLSLog /var/log/proftpd/ftp_ssl.log # where to log to
# TLSProtocol SSLv23 # SSLv23 or TLSv1
# TLSOptions NoCertRequest # either to request the certificate or not
# TLSRSACertificateFile /etc/proftpd/ssl.crt # SSL certfile
# TLSRSACertificateKeyFile /etc/proftpd/ssl.key # SSL keyfile
# TLSVerifyClient off # client verification
#</IfModule>
#
# ISPCP Quota management;
#
<IfModule mod_quotatab.c>
QuotaEngine on
QuotaShowQuotas on
QuotaDisplayUnits Mb
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 quotalimits 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 quotatallies 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}'" quotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies
QuotaLock /var/run/proftpd/tally.lock
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
</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>
# ispCP SQL Managment
SQLBackend mysql
SQLAuthTypes Crypt
SQLAuthenticate on
SQLConnectInfo ispcp@localhost vftp password
SQLUserInfo ftp_users userid passwd uid gid homedir shell
SQLGroupInfo ftp_group groupname gid members
SQLMinUserUID 2000
SQLMinUserGID 2000
# 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>
Include /etc/proftpd/ispcp/*