LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   FC4, proftpd + mysql authentication error (https://www.linuxquestions.org/questions/fedora-35/fc4-proftpd-mysql-authentication-error-518351/)

prophoto 01-11-2007 09:00 AM

FC4, proftpd + mysql authentication error
 
I am running FC4, proftpd 1.3.0, mysql 4.1.20. I have followed these instructions on how to set up proftpd-mysql authentication for my new website. I need to have ftp access available to all users, but I do not want to create system accounts for hundreds (or more) users.

http://www.howtoforge.com/proftpd_mysql_virtual_hosting

I have followed everything to the T, but when I start proftpd I get the error:

[root@localhost sbin]# ./proftpd
- Fatal: unknown configuration directive 'SQLAuthTypes' on line 72 of '/etc/proftpd.conf'

Thank You for your help, suggestions on how to make this even more secure are welcome!

Here is my proftpd.conf:

#
# To have more informations about Proftpd configuration
# look at : http://www.proftpd.org/
#

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD"
ServerType inetd
ServerType inetd
DefaultServer on
<Global>
DefaultRoot ~ psacln
AllowOverwrite on
</Global>
DefaultTransferMode binary
UseFtpUsers 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

#Following part of this config file were generate by PSA automatically
#Any changes in this part will be overwritten by next manipulation
#with Anonymous FTP feature in PSA control panel.

#Include directive should point to place where FTP Virtual Hosts configurations
#preserved

ScoreboardFile /var/run/proftpd/scoreboard

# Primary log file mest be outside of system logrotate province

TransferLog /usr/local/psa/var/log/xferlog

#Change default group for new files and directories in vhosts dir to psacln

<Directory /var/www/vhosts>
GroupOwner psacln
</Directory>

# Enable PAM authentication
AuthPAM on
AuthPAMConfig proftpd

IdentLookups off
UseReverseDNS off

AuthGroupFile /etc/group

Include /etc/proftpd.include

#Section added by Greg on 1-10-07 for mysql user authentication

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 passftp_photo


# 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

bathory 01-12-2007 02:32 AM

I have a similar setup using ProMA. Your config is similar to mine, except that I have a line to include mod_sql.c (I guess that is your problem, because without that module proftpd does not know how to use mysql to authenticate users) and a different "SQLAuthTypes":
Code:

AuthOrder mod_sql.c
SQLAuthTypes          backend
...

Try it and see if it works.

Regards

prophoto 01-13-2007 01:59 PM

Is the module you listed something I will need to download/install or is it "stock."

prophoto 01-13-2007 04:48 PM

I added that line and I still get the same error message.

I am definitely going to try the proma project you spoke of, I really like the idea of being able to suspend an account without changing u/n or p/w.

bathory 01-13-2007 05:30 PM

Quote:

Is the module you listed something I will need to download/install or is it "stock."
It should exist in the package you have installed from your distro (proftpd-mysql). I've manually installed proftpd from source using the mysql support, which created that module.

prophoto 01-14-2007 08:25 AM

I did a yum install of proftpd-devel and the module is now available. From what I have read I now need to recofigure the proftpd executable. I am a noob at this type of stuff, could someone give me step by step? Thanx!


All times are GMT -5. The time now is 01:17 PM.