Current time: 12-25-2024, 03:31 AM Hello There, Guest! (LoginRegister)


Post Reply 
[Solved] another proftpd issue (authentification issue)
Author Message
yohann Offline
Junior Member
*

Posts: 15
Joined: Apr 2009
Reputation: 0
Post: #1
[Solved] another proftpd issue (authentification issue)
hello,
i meet another proftpd issue,
when i run then debug command, everything looks fine:

Code:
root@Web2009:~# proftpd -n -d5
- mod_tls/2.1.2: using OpenSSL 0.9.8g 19 Oct 2007
- DenyFilter: compiling deny regex '\*.*/'
- <IfModule>: using 'mod_quotatab.c' section at line 92
- <IfModule>: skipping 'mod_ratio.c' section at line 96
- <IfModule>: using 'mod_delay.c' section at line 104
- <IfModule>: using 'mod_ctrls.c' section at line 108
- <IfModule>: using 'mod_ctrls_admin.c' section at line 116
Web2009.inforezo.com -
Web2009.inforezo.com - Config for Debian:
Web2009.inforezo.com - DeferWelcome
Web2009.inforezo.com - DefaultServer
Web2009.inforezo.com - ShowSymlinks
Web2009.inforezo.com - TimeoutNoTransfer
Web2009.inforezo.com - TimeoutStalled
Web2009.inforezo.com - TimeoutIdle
Web2009.inforezo.com - DisplayLogin
Web2009.inforezo.com - DisplayChdir
Web2009.inforezo.com - ListOptions
Web2009.inforezo.com - DenyFilter
Web2009.inforezo.com - UserID
Web2009.inforezo.com - UserName
Web2009.inforezo.com - GroupID
Web2009.inforezo.com - GroupName
Web2009.inforezo.com - Umask
Web2009.inforezo.com - DirUmask
Web2009.inforezo.com - AllowOverwrite
Web2009.inforezo.com - TransferLog
Web2009.inforezo.com - QuotaEngine
Web2009.inforezo.com - DelayEngine
Web2009.inforezo.com - ProFTPD 1.3.1 (stable) (built Thu Feb 21 04:21:14 UTC 2008) standalone mode STARTUP

but i have an unknow user error each time i try to connect.

after reading posts in the forum i found that i couldn't connect to mysql using an ftpuser:

mysql -u yohann@inforezo.com -pmypass
ERROR 1045 (28000): Access denied for user 'yohann@inforezo.'@'localhost' (using password: YES)

i don't know why the username is truncated.

i tried logind to mysql as root and list all mysql users:
Code:
+------------------+
| User             |
+------------------+
| root             |
|                  |
| root             |
|                  |
| adminguidance    |
| consultguidance  |
| debian-sys-maint |
| ig_testeur       |
| inforezo         |
| karine           |
| phpmyvisites     |
| pma              |
| root             |
| vftp             |
| wikini           |
+------------------+

i can't see any of the ftp account, but the user vftp.

here is a what i see when i try to login after i set proftpd in debug mode:

Code:
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - FTP session requested from unknown class
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - connected - local  : ::ffff:192.168.0.2:21
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - connected - remote : ::ffff:88.171.98.41:52416
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - FTP session opened.
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'USER yohann@inforezo.com' to mod_rewrite
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'USER yohann@inforezo.com' to mod_tls
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'USER yohann@inforezo.com' to mod_core
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'USER yohann@inforezo.com' to mod_core
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'USER yohann@inforezo.com' to mod_delay
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'USER yohann@inforezo.com' to mod_auth
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching CMD command 'USER yohann@inforezo.com' to mod_auth
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - no supplemental groups found for user 'yohann@inforezo.com'
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching POST_CMD command 'USER yohann@inforezo.com' to mod_sql
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching POST_CMD command 'USER yohann@inforezo.com' to mod_delay
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching LOG_CMD command 'USER yohann@inforezo.com' to mod_sql
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching LOG_CMD command 'USER yohann@inforezo.com' to mod_log
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap2
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_ban
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_radius
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_sql
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching CMD command 'PASS (hidden)' to mod_auth
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - no supplemental groups found for user 'yohann@inforezo.com'
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - no such user 'yohann@inforezo.com'
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - USER yohann@inforezo.com: no such user found from lal69-5-88-171-98-41.fbx.proxad.net [::ffff:88.171.98.41] to ::ffff:192.168.0.2:21
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_sql
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_sql
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth
Web2009.inforezo.com (lal69-5-88-171-98-41.fbx.proxad.net[::ffff:88.171.98.41]) - FTP session closed.


i really don't know where does this probleme come from.

thank you for help
(This post was last modified: 04-29-2009 08:06 PM by yohann.)
04-28-2009 10:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: another proftpd issue (authentification issue)
You're mixing some concepts here: mysql users aren't the same as FTP users.

If you want to list your system's ftp users, connect to mysql as root and execute:
Code:
use ispcp; select userid from ftp_users

If there is no "yohann@inforenzo.com" user listed there, you just need to actually create it through the panel. Otherwise, it means that proftpd isn't correctly configured. Can you post your /etc/proftpd/proftpd.conf file please?
04-28-2009 11:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
yohann Offline
Junior Member
*

Posts: 15
Joined: Apr 2009
Reputation: 0
Post: #3
RE: another proftpd issue (authentification issue)
first thank you for this real quick answer!

i' executed the commande you told me about, and i see yohann@inforezo.com so my user is recorded.

here is my proftpd.conf:

Code:
root@Web2009:~# cat /etc/prof
profile       profile.d/    proftpd/      proftpd.conf  
root@Web2009:~# cat /etc/proftpd.conf
#
# ispCP ω (OMEGA) a Virtual Hosting Control System
#
# @copyright    2001-2006 by moleSoftware GmbH
# @copyright    2006-2008 by ispCP | http://isp-control.net
# @version        SVN: $Id$
# @link            http://isp-control.net
# @author        ispCP Team
#
# @license
#   This program is free software; you can redistribute it and/or modify it under
#   the terms of the MPL General Public License as published by the Free Software
#   Foundation; either version 1.1 of the License, or (at your option) any later
#   version.
#   You should have received a copy of the MPL Mozilla Public License along with
#   this program; if not, write to the Open Source Initiative (OSI)
#   http://opensource.org | osi@opensource.org
#
################################################################################​
# 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                 "Web2009.inforezo.com"
ServerType                 standalone
DeferWelcome               off

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
DisplayFirstChdir          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>

#
# 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
# Activate for proftpd >= 1.3
#SQLBackend                 mysql
SQLAuthTypes               Crypt
SQLAuthenticate            on
SQLConnectInfo             ispcp@localhost vftp ,@Wj+HNz^o%/&3[=-
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/*
04-28-2009 11:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: another proftpd issue (authentification issue)
1. Ucomment the line"#Include /etc/proftpd/modules.conf" at the beggining of this file
2. Restart FTP server
3. Try to connect
4. (If failed) try to connect to mysql with the vftp user
Quote:SQLConnectInfo ispcp@localhost vftp ,@Wj+HNz^o%/&3[=-
5. Change the vftp user's password and update it on the above line (because you just gave us your pass! Tongue)

If at this point you still get "uknown user" errors, configure mysql to log all queries, try to connect to the ftp, and post the queries that got executed by the vftp user.

Hope this helps...
(This post was last modified: 04-29-2009 12:28 AM by kilburn.)
04-29-2009 12:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #5
RE: another proftpd issue (authentification issue)
not the first hint is the right one -> according to your debug output, the module is not loaded for sql-authentication.

And so its already in the wiki... however.
04-29-2009 12:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
yohann Offline
Junior Member
*

Posts: 15
Joined: Apr 2009
Reputation: 0
Post: #6
RE: another proftpd issue (authentification issue)
thank you for all your answers,
I'll test this just after lunch,

i just wanted to say that the wiki was obsouly the first place where i looked for help:;

so here are all symptoms I've seen in the wiki and i didn't see one of them in my debug
Quote:Fatal: unknown configuration directive 'SQLAuthTypes' on line xxx of '/etc/proftpd/proftpd.conf SQL Module not loaded
The FTP service is UP (running) but users can not connect FTP up but users can not connect
Can not open directory. Please contact system administrator (in the GUI) Can not open directory
Failed binding to 0.0.0.0, port 21: Address already in use. Check the ServerType directive to ensure you are configured correctly. Address already in use
so if i understand well i need to follow the wiki as if i've seen Fatal: unknown configuration directive 'SQLAuthTypes' on line xxx of '/etc/proftpd/proftpd.conf
i'll give you some news in a couple of hours, thank you again
04-29-2009 04:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #7
RE: another proftpd issue (authentification issue)
hm ok,
Since every loaded module moans around if started with debug output...

We pay special attention to those who should've been loaded ... (sth. like mod_sql_auth)...
and didn't come up with a single hint or so.
04-29-2009 06:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
yohann Offline
Junior Member
*

Posts: 15
Joined: Apr 2009
Reputation: 0
Post: #8
RE: another proftpd issue (authentification issue)
ok
thank you for the precision
04-29-2009 06:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
yohann Offline
Junior Member
*

Posts: 15
Joined: Apr 2009
Reputation: 0
Post: #9
RE: another proftpd issue (authentification issue)
ok,
i'm sorry guys, i can't make it work!
i did the fallowing:

edit /etc/proftpd.conf

uncommented de line #Include /etc/proftpd/modules.conf" at the beggining of this file
change mypassword

then i connected as root to mysql, executed the fallowing command:
SET PASSWORD FOR 'vftp'@'localhost' = PASSWORD('nouveau_mot');

then exited mysql

tryed to reconnect with my new passowd from the shell
it worked.

then i restarted proftpd
i still can't connect.

so i stopped mysql: /etc/init.d/mysql restart.

then i started mysql --log=/var/log/mysql/mylog

then i connected again to mysql from the shell just to see loging worked.
it worked.
so i restarted proftpd again.
then try to connect from a ftpcllient.
and i can't see any new query in /vaar/log/mysql/mylog

so i guess i have a probleme to connect to the database.
but what is it?

Again thank you for helping me

edit: also i've checked the file /etc/proftpd/module.conf, and i see both LoadModule mod_sql.c and LoadModule mod_sql_mysql.c

edit: i've also tried to uncomment the MysqlBackend line, but it doesn't changed anything
(This post was last modified: 04-29-2009 01:28 PM by yohann.)
04-29-2009 01:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #10
RE: another proftpd issue (authentification issue)
yohann Wrote:i did the fallowing:

edit /etc/proftpd.conf

Wrong, the correct file to look at is /etc/proftpd/proftpd.conf!
04-29-2009 03:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)