LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-11-2007, 09:00 AM   #1
prophoto
Member
 
Registered: Jul 2006
Posts: 30

Rep: Reputation: 0
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
 
Old 01-12-2007, 02:32 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
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
 
Old 01-13-2007, 01:59 PM   #3
prophoto
Member
 
Registered: Jul 2006
Posts: 30

Original Poster
Rep: Reputation: 0
Is the module you listed something I will need to download/install or is it "stock."
 
Old 01-13-2007, 04:48 PM   #4
prophoto
Member
 
Registered: Jul 2006
Posts: 30

Original Poster
Rep: Reputation: 0
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.
 
Old 01-13-2007, 05:30 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
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.
 
Old 01-14-2007, 08:25 AM   #6
prophoto
Member
 
Registered: Jul 2006
Posts: 30

Original Poster
Rep: Reputation: 0
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
.htaccess with Basic authentication throws MySQL error in Error Log shailesh_mishra Linux - Security 6 01-17-2007 10:15 AM
Basic authentication with .htaccess throws MySQL error in Error Log shailesh_mishra Linux - Networking 2 01-12-2007 01:16 PM
Proftpd and mysql authentication question Galam Linux - Networking 0 09-14-2005 10:31 AM
Proftpd & MySQL Authentication Help Needed CyonyC Linux - Newbie 3 06-23-2004 07:01 PM
ProFTPd & MySQL Authentication Help CyonyC Linux - Software 4 06-22-2004 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:06 AM.

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