Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2012 08:40:19 +0200
From:      =?iso-8859-2?Q?Radek_Krej=E8a?= <radek.krejca@starnet.cz>
To:        "'ports@freebsd.org'" <ports@freebsd.org>
Subject:   Proftpd mysql problem after upgrade ports
Message-ID:  <B2E0472020754D45B72E9B0CE35278CA90DB32DD92@EXCHANGE.mail.starnet.cz>

next in thread | raw e-mail | index | archive | help
Hi, I have problem with this module. I upgraded ports and I have this proft=
pd.conf

ServerName			"Servername"
ServerType			standalone
ServerIdent			on		"Servers identifying string"
DeferWelcome			on
DefaultServer			on
UseIPv6                         on
DefaultRoot                     ~
AllowOverwrite          	on

DisplayLogin			.welcome	# Textfile to display on login
DisplayConnect			.connect	# Textfile to display on connection

UseReverseDNS       		off
IdentLookups        		off

Port				21
Umask				022
MaxInstances                    15
MaxClientsPerHost               3 		"Only %m connections per host allowed"
MaxClients                      10 		"Only %m total simultanious logins all=
owed"
MaxHostsPerUser                 1

User				nobody
Group				nobody

ScoreboardFile 			/var/log/scoreboard

# Some logging formats
LogFormat            		default 	"%h %l %u %t \"%r\" %s %b"
LogFormat            		auth    	"%v [%P] %h %t \"%r\" %s"
LogFormat            		write   	"%h %l %u %t \"%r\" %s %b"

# Define log-files to use
#TransferLog          		/var/log/proftpd.xferlog
#ExtendedLog         		/var/log/proftpd.access_log    WRITE,READ write
#ExtendedLog          		/var/log/proftpd.auth_log      AUTH auth
#ExtendedLog          		/var/log/proftpd.paranoid_log  ALL default
#SQLLogFile			/var/log/proftpd.mysql
#QuotaLog 			/var/log/proftpd.quota

# Set up authentication via SQL
# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
SQLEngine 			on
SQLAuthenticate 		on
AuthOrder                       mod_sql.c
SQLAuthTypes			Backend
SQLConnectInfo       		proftpd_admin@localhost proftpd_admin pokus=20
SQLUserInfo       		usertable userid passwd uid gid homedir shell=20
SQLGroupInfo       		grouptable groupname gid members=20
SQLUserWhereClause    		"disabled=3D0 and (NOW()<=3Dexpiration or expiratio=
n=3D-1 or expiration=3D0)"

# Log the user logging in
SQLLog PASS counter
SQLNamedQuery counter UPDATE "lastlogin=3Dnow(), count=3Dcount+1 WHERE user=
id=3D'%u'" usertable

# logout log
SQLLog EXIT time_logout
SQLNamedQuery time_logout UPDATE "lastlogout=3Dnow() WHERE userid=3D'%u'" u=
sertable

# display last login time when PASS command is given
SQLNamedQuery login_time SELECT "lastlogin from usertable where userid=3D'%=
u'"
SQLShowInfo PASS "230" "Last login was: %{login_time}"

# xfer Log in mysql
SQLLog RETR,STOR transfer1
SQLNamedQuery  transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', =
now(), 'c', NULL" xfer_stat
SQLLOG ERR_RETR,ERR_STOR transfer2
SQLNamedQuery  transfer2 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', =
now(), 'i', NULL" xfer_stat

# User quotas
# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#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, f=
iles_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name =3D '%{0}' =
AND quota_type =3D '%{1}'"
#SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, byt=
es_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_use=
d FROM ftpquotatallies WHERE name =3D '%{0}' AND quota_type =3D '%{1}'"
#SQLNamedQuery update-quota-tally UPDATE "bytes_in_used =3D bytes_in_used +=
 %{0}, bytes_out_used =3D bytes_out_used + %{1}, bytes_xfer_used =3D bytes_=
xfer_used + %{2}, files_in_used =3D files_in_used + %{3}, files_out_used =
=3D files_out_used + %{4}, files_xfer_used =3D files_xfer_used + %{5} WHERE=
 name =3D '%{6}' AND quota_type =3D '%{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


AllowStoreRestart 		on
AllowRetrieveRestart		on
RequireValidShell               off
#PathDenyFilter 			"\\.ftp)|\\.ht)[a-z]+$"=20
DenyFilter 			\*.*/


<Directory /ftp/*>
	AllowOverwrite		off
 	HideNoAccess		off
	<Limit READ>
		AllowAll
        </Limit>

	<Limit WRITE>
		DenyGroup	!admins
 	</Limit>
</Directory>

<Directory /ftp/incoming/*>
	AllowOverwrite		on
	HideNoAccess		on

	<Limit READ>
      		DenyGroup	!admins
    	</Limit>

    	<Limit STOR MKD>
      		AllowAll
    	</Limit>
</Directory>

Before upgrade ports I had=20
proftpd-1.3.4a      Highly configurable FTP daemon
proftpd-mod_sql_mysql-1.3.4a MySQL module for ProFTPD

and this config file worked. After upgrade I have=20
proftpd-1.3.4a_2    Highly configurable FTP daemon
proftpd-mod_sql_mysql-1.3.4a_2 MySQL module for ProFTPD

and after starting I got this message: Fatal: unknown configuration directi=
ve 'SQLEngine' on line 43 of '/usr/local/etc/proftpd.conf'

It looks like, that mod_sql isnt loaded,=20
Compiled-in modules:
  mod_core.c
  mod_xfer.c
  mod_auth_unix.c
  mod_auth_file.c
  mod_auth.c
  mod_ls.c
  mod_log.c
  mod_site.c
  mod_delay.c
  mod_facts.c
  mod_dso.c
  mod_ident.c
  mod_auth_pam.c
  mod_ctrls.c
  mod_lang.c

but I have compiled port proftpd with mod_sql (/var/db/ports/proftpd/option=
s OPTIONS_FILE_SET+=3DSQL
OPTIONS_FILE_SET+=3DSQL_PASSWD)

Where could be a problem?

I have fbsd 9.0 latest amd64 generic kernel.

Thank you for any suggestion. Radek




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B2E0472020754D45B72E9B0CE35278CA90DB32DD92>