proftpd+mysql

Проблемы с установкой, настройкой и работой системных и сетевых программ.

Модераторы: GRooVE, alexco

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Иван
проходил мимо

proftpd+mysql

Непрочитанное сообщение Иван » 2008-02-17 15:30:31

фрибсд 6.3, профтпдп 1.3
все замечательно стоит без скля работает, а при авторизации не хочет, вот логи, уже замучался искать, может кто подскажет в чем пробелма(

proftpd.conf
===========

Код: Выделить всё

ServerName                      "ftp"
ServerType                      standalone
ServerIdent                     on              "ftp"
DeferWelcome                    on
DefaultServer                   on

DisplayLogin                    .welcome        # Textfile to display on login
DisplayConnect                  .connect        # Textfile to display on connection
DisplayChdir                   .firstchdir true # Textfile to display on first changedir

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 allowed"
MaxHostsPerUser                 1

User                            nobody
Group                           nogroup

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
# ===========
AuthOrder                       mod_sql.c
SQLAuthTypes                    Backend
SQLConnectInfo                  proftpd_admin@localhost proftpd пароль
SQLUserInfo                     usertable userid passwd uid gid homedir shell
SQLGroupInfo                    grouptable groupname gid members
SQLUserWhereClause              "disabled=0 and (NOW()<=expiration or expiration=-1 or expiration=0)"

# Log the user logging in
SQLLog PASS counter
SQLNamedQuery counter UPDATE "lastlogin=now(), count=count+1 WHERE userid='%u'" usertable

# logout log
SQLLog EXIT time_logout
SQLNamedQuery time_logout UPDATE "lastlogout=now() WHERE userid='%u'" usertable

# display last login time when PASS command is given
SQLNamedQuery login_time SELECT "lastlogin from usertable where userid='%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
# ===========
QuotaEngine on
QuotaDirectoryTally on
QuotaDisplayUnits Mb
QuotaShowQuotas on

SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used,
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_o
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallie

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]+$"
DefaultRoot                     ~
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>
================

Код: Выделить всё

proftpd -nd 10
*
*
dftp - ProFTPD 1.3.1 (stable) (built Sun Feb 17 13:26:33 MSK 2008) standalone mode STARTUP
dftp - ROOT PRIVS at pidfile.c:42
dftp - RELINQUISH PRIVS at pidfile.c:44
xx-стучусь на фтп
dftp - no matching vhost found for 192.168.0.8#21, using DefaultServer 'Dz ftp servant'
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at main.c:903
dftp (192.168.0.103[192.168.0.103]) - SETUP PRIVS at main.c:908
dftp (192.168.0.103[192.168.0.103]) - FTP session requested from unknown class
dftp (192.168.0.103[192.168.0.103]) - performing module session initializations
dftp (192.168.0.103[192.168.0.103]) - mod_clamav/0.5: warning: No local socket was specified.
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_quotatab.c:384
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_quotatab.c:386
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_quotatab.c:2682
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_quotatab.c:2689
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_quotatab.c:2698
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_quotatab.c:2705
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_sql.c:4221
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_sql.c:4223
dftp (192.168.0.103[192.168.0.103]) - mod_sql/4.2.2: defaulting to 'mysql' backend
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_delay.c:1232
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_delay.c:1234
dftp (192.168.0.103[192.168.0.103]) - mod_log: opening ExtendedLog '/var/log/proftpd.paranoid_log'
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_log.c:1218
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_log.c:1220
dftp (192.168.0.103[192.168.0.103]) - mod_log: opening ExtendedLog '/var/log/proftpd.auth_log'
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_log.c:1218
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_log.c:1220
dftp (192.168.0.103[192.168.0.103]) - mod_log: opening ExtendedLog '/var/log/proftpd.access_log'
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_log.c:1218
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_log.c:1220
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_auth.c:151
dftp (192.168.0.103[192.168.0.103]) - opening scoreboard '/var/log/scoreboard'
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_auth.c:153
dftp (192.168.0.103[192.168.0.103]) - AuthOrder in effect, resetting auth module order
dftp (192.168.0.103[192.168.0.103]) - ident lookup disabled
dftp (192.168.0.103[192.168.0.103]) - connected - local  : 192.168.0.8:21
dftp (192.168.0.103[192.168.0.103]) - connected - remote : 192.168.0.103:2640
dftp (192.168.0.103[192.168.0.103]) - unable to display DisplayConnect file '.connect': No such file or directory
dftp (192.168.0.103[192.168.0.103]) - FTP session opened.
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'USER anonymous' to mod_tls
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'USER anonymous' to mod_rewrite
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'USER anonymous' to mod_core
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'USER anonymous' to mod_core
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'USER anonymous' to mod_delay
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'USER anonymous' to mod_auth
dftp (192.168.0.103[192.168.0.103]) - dispatching CMD command 'USER anonymous' to mod_ratio
dftp (192.168.0.103[192.168.0.103]) - dispatching CMD command 'USER anonymous' to mod_auth
dftp (192.168.0.103[192.168.0.103]) - no supplemental groups found for user 'anonymous'
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD command 'USER anonymous' to mod_sql
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD command 'USER anonymous' to mod_delay
dftp (192.168.0.103[192.168.0.103]) - dispatching LOG_CMD command 'USER anonymous' to mod_sql
dftp (192.168.0.103[192.168.0.103]) - dispatching LOG_CMD command 'USER anonymous' to mod_log
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_radius
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap2
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_sql
dftp (192.168.0.103[192.168.0.103]) - no supplemental groups found for user 'anonymous'
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
dftp (192.168.0.103[192.168.0.103]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
dftp (192.168.0.103[192.168.0.103]) - dispatching CMD command 'PASS (hidden)' to mod_auth
dftp (192.168.0.103[192.168.0.103]) - no such user 'anonymous'
dftp (192.168.0.103[192.168.0.103]) - USER anonymous: no such user found from 192.168.0.103 [192.168.0.103] to 192.168.0.8:21
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_sql
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay
dftp (192.168.0.103[192.168.0.103]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_sql
dftp (192.168.0.103[192.168.0.103]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log
dftp (192.168.0.103[192.168.0.103]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth
dftp (192.168.0.103[192.168.0.103]) - FTP session closed.
хх-открывается окно ввода логина пароля
ввожу логин пароль юзера, в логи сыплется
*
*

Код: Выделить всё

dftp (192.168.0.103[192.168.0.103]) - DenyFilter
dftp (192.168.0.103[192.168.0.103]) - CURRENT-CLIENTS
dftp (192.168.0.103[192.168.0.103]) - USER
dftp (192.168.0.103[192.168.0.103]) - USER 123: Login successful.
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_auth.c:1181

dftp (192.168.0.103[192.168.0.103]) - opening TransferLog '/var/log/proftpd.xferlog'
dftp (192.168.0.103[192.168.0.103]) - setting group ID: 10001
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_auth.c:1218
dftp (192.168.0.103[192.168.0.103]) - USER PRIVS 10005 at mod_auth.c:637
dftp (192.168.0.103[192.168.0.103]) - retrieved UID 10005 for user '123'
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_auth.c:641
dftp (192.168.0.103[192.168.0.103]) - Preparing to chroot to directory '/ftp'
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_auth.c:80
dftp (192.168.0.103[192.168.0.103]) - RELINQUISH PRIVS at mod_auth.c:87
dftp (192.168.0.103[192.168.0.103]) - Environment successfully chroot()ed.
dftp (192.168.0.103[192.168.0.103]) - ROOT PRIVS at mod_auth.c:1262
dftp (192.168.0.103[192.168.0.103]) - SETUP PRIVS at mod_auth.c:1269
dftp (192.168.0.103[192.168.0.103]) - in dir_check_full(): path = '/', fullpath = '/ftp/'.
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD command 'PASS (hidden)' to mod_sql
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD command 'PASS (hidden)' to mod_ifsession
dftp (192.168.0.103[192.168.0.103]) - dispatching POST_CMD command 'PASS (hidden)' to mod_quotatab
dftp (192.168.0.103[192.168.0.103]) - FTP session closed.
-----------
скл

Код: Выделить всё

show tables
    -> ;
+-------------------------+
| Tables_in_proftpd_admin |
+-------------------------+
| ftpquotalimits          |
| ftpquotatallies         |
| grouptable              |
| usertable               |
| xfer_stat               |
+-------------------------+
5 rows in set (0.00 sec)

describe usertable
    -> ;
+------------+------------+------+-----+---------------------+----------------+
| Field      | Type       | Null | Key | Default             | Extra          |
+------------+------------+------+-----+---------------------+----------------+
| userid     | text       | YES  |     | NULL                |                |
| passwd     | text       | YES  |     | NULL                |                |
| homedir    | text       | YES  |     | NULL                |                |
| shell      | text       | YES  |     | NULL                |                |
| uid        | int(11)    |      | PRI | NULL                | auto_increment |
| gid        | int(11)    | YES  |     | NULL                |                |
| count      | int(11)    |      |     | 0                   |                |
| lastlogin  | datetime   |      |     | 0000-00-00 00:00:00 |                |
| lastlogout | datetime   |      |     | 0000-00-00 00:00:00 |                |
| expiration | datetime   |      |     | 0000-00-00 00:00:00 |                |
| disabled   | tinyint(4) | YES  |     | 0                   |                |
| det_name   | tinytext   | YES  |     | NULL                |                |
| det_mail   | tinytext   | YES  |     | NULL                |                |
| det_adress | tinytext   | YES  |     | NULL                |                |
| det_notes  | tinytext   | YES  |     | NULL                |                |
+------------+------------+------+-----+---------------------+----------------+
15 rows in set (0.00 sec)

mysql> select userid from usertable
    -> ;
+--------+
| userid |
+--------+
| test   |
| 123    |
+--------+
2 rows in set (0.00 sec)

mysql> select passwd from usertable
    -> ;
+-------------------------------------------+
| passwd                                    |
+-------------------------------------------+
| *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
| *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 |
+-------------------------------------------+
2 rows in set (0.01 sec)
Последний раз редактировалось hizel 2008-03-23 0:55:43, всего редактировалось 1 раз.
Причина: [code][/code] >8O

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Иван
проходил мимо

Re: proftpd+mysql

Непрочитанное сообщение Иван » 2008-02-17 17:53:47

проблема авторизации разрешилась, профтпд не кушал никакого логина от скл, кроме рута, но появилась другая проблема, юзер логинится, но ничего не может записать, только чтение.

uname -a
FreeBSD dftp 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #1: Fri Feb 15 16:45:32 MSK 2008 root@dftp:/usr/obj/usr/src/sys/kernel i386
---
proftpd -vv
- ProFTPD Version: 1.3.1 (stable)
- Scoreboard Version: 01040002
- Built: Sun Feb 17 13:26:33 MSK 2008
- Module: mod_core.c
- Module: mod_xfer.c
- Module: mod_auth_unix.c
- Module: mod_auth_file/0.8.3
- Module: mod_auth.c
- Module: mod_ls.c
- Module: mod_log.c
- Module: mod_site.c
- Module: mod_delay/0.6
- Module: mod_auth_pam/1.0.1
- Module: mod_sql/4.2.2
- Module: mod_ratio.c
- Module: mod_readme.c
- Module: mod_rewrite/0.6.8
- Module: mod_wrap2/2.0.6
- Module: mod_radius/0.9
- Module: mod_sql_mysql/4.0.7
- Module: mod_tls/2.1.2
- Module: mod_quotatab/1.3.0
- Module: mod_quotatab_file.c
- Module: mod_quotatab_sql.c
- Module: mod_clamav.c
- Module: mod_ifsession/0.9
-----proftpd.conf
ServerName "ftp"
ServerType standalone
ServerIdent on "ftp is working"
DeferWelcome on
DefaultServer on

DisplayLogin .welcome # Textfile to display on login
DisplayConnect .connect # Textfile to display on connection
DisplayChdir .firstchdir true # Textfile to display on first changedir

UseReverseDNS off
IdentLookups off

#Port 21
PassivePorts 50000 52000
Umask 022
MaxInstances 15
MaxClientsPerHost 3 "Only %m connections per host allowed"
MaxClients 10 "Only %m total simultanious logins allowed"
MaxHostsPerUser 1

User nobody
Group nogroup

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
# ===========
AuthOrder mod_sql.c
SQLAuthTypes Backend
SQLConnectInfo proftpd_admin@localhost root пароль
SQLUserInfo usertable userid passwd uid gid homedir shell
SQLGroupInfo grouptable groupname gid members
SQLUserWhereClause "disabled=0 and (NOW()<=expiration or expiration=-1 or expiration=0)"

# Log the user logging in
SQLLog PASS counter
SQLNamedQuery counter UPDATE "lastlogin=now(), count=count+1 WHERE userid='%u'" usertable

# logout log
SQLLog EXIT time_logout
SQLNamedQuery time_logout UPDATE "lastlogout=now() WHERE userid='%u'" usertable

# logout log
SQLLog EXIT time_logout
SQLNamedQuery time_logout UPDATE "lastlogout=now() WHERE userid='%u'" usertable

# display last login time when PASS command is given
SQLNamedQuery login_time SELECT "lastlogin from usertable where userid='%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
# ===========
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,
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_u
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies

SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail,
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_u
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %
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]+$"
DefaultRoot ~
DenyFilter \*.*/


<Directory /ftp/*>
AllowOverwrite off
HideNoAccess off
# Umask 000
<Limit READ>
AllowAll
</Limit>
</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>

<Anonymous /ftp>
User ftp
Group ftp
MaxClients 10 "Sorry, max %m users - try again later"
<Limit WRITE>
DenyAll
</Limit>
</Anonymous>
=============================================
cd /
dftp# ls -l | grep ftp
drwxr-xr-x 4 root wheel 512 Feb 17 16:48 ftp
dftp# cd /ftp
dftp# ls -l
total 4
drwxrwxrwx 2 root wheel 512 Feb 17 16:48 1
drwxr-xrwx 2 root wheel 512 Feb 16 22:57 incomings
dftp#
=============================================
connect to ftp
# ftp 192.168.0.8
Connected to 192.168.0.8.
220 dzftp is working
Name (192.168.0.8:Akela): 1234
331 Password required for 1234
Password:
230-Last login was: 2008-02-17 17:28:19
230 User 1234 logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> mkdir diiiir
550 diiiir: No such file or directory
ftp>
=============================================
что пишет в дебагмоде
dftp - ProFTPD 1.3.1 (stable) (built Sun Feb 17 13:26:33 MSK 2008) standalone mode STARTUP
*
*
dftp (127.0.0.1[127.0.0.1]) - FTP session requested from unknown class
dftp (127.0.0.1[127.0.0.1]) - mod_clamav/0.5: warning: No local socket was specified.
dftp (127.0.0.1[127.0.0.1]) - AuthOrder in effect, resetting auth module order
dftp (127.0.0.1[127.0.0.1]) - ident lookup disabled
dftp (127.0.0.1[127.0.0.1]) - connected - local : 127.0.0.1:21
dftp (127.0.0.1[127.0.0.1]) - connected - remote : 127.0.0.1:58847
dftp (127.0.0.1[127.0.0.1]) - unable to display DisplayConnect file '.connect': No such file or directory
dftp (127.0.0.1[127.0.0.1]) - FTP session opened.
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER 1234' to mod_tls
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER 1234' to mod_rewrite
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER 1234' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER 1234' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER 1234' to mod_delay
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER 1234' to mod_auth
dftp (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER 1234' to mod_ratio
dftp (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER 1234' to mod_auth
dftp (127.0.0.1[127.0.0.1]) - no supplemental groups found for user '1234'
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER 1234' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER 1234' to mod_delay
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER 1234' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER 1234' to mod_log
dftp (127.0.0.1[127.0.0.1]) - Preparing to chroot to directory '/ftp'
dftp (127.0.0.1[127.0.0.1]) - Environment successfully chroot()ed.
dftp (127.0.0.1[127.0.0.1]) - in dir_check_full(): path = '/', fullpath = '/ftp/'.
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_ifsession
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_quotatab
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_tls
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_radius
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_wrap2
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_readme
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_ratio
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_delay
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_log
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_ls
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)' to mod_auth
dftp (127.0.0.1[127.0.0.1]) - unable to display DisplayLogin file '.welcome': No such file or directory
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' to mod_log
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' to mod_ratio
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_tls
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_rewrite
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching CMD command 'SYST' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'SYST' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'SYST' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'SYST' to mod_log
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'FEAT' to mod_tls
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'FEAT' to mod_rewrite
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'FEAT' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'FEAT' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching CMD command 'FEAT' to mod_core
dftp (127.0.0.1[127.0.0.1]) - in dir_check_full(): path = '/', fullpath = '/ftp/'.
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'FEAT' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'FEAT' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'FEAT' to mod_log
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PWD' to mod_tls
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PWD' to mod_rewrite
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PWD' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PWD' to mod_core
dftp (127.0.0.1[127.0.0.1]) - dispatching CMD command 'PWD' to mod_core
dftp (127.0.0.1[127.0.0.1]) - in dir_check_full(): path = '/', fullpath = '/ftp/'.
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PWD' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PWD' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PWD' to mod_log


dftp (127.0.0.1[127.0.0.1]) - in dir_check_full(): path = '/diiir', fullpath = '/ftp/diiir'.
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD_ERR command 'MKD diiir' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching POST_CMD_ERR command 'MKD diiir' to mod_quotatab
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'MKD diiir' to mod_sql
dftp (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD_ERR command 'MKD diiir' to mod_log

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35126
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: proftpd+mysql

Непрочитанное сообщение Alex Keda » 2008-02-17 18:21:46

сообщения нормально оформи.
желания разбирать портянку - скорей всего ни у кого нет.
Убей их всех! Бог потом рассортирует...

AzureZ
мл. сержант
Сообщения: 124
Зарегистрирован: 2007-11-06 17:07:27
Откуда: Москва

Re: proftpd+mysql

Непрочитанное сообщение AzureZ » 2008-02-17 20:10:50

А пользователь 1234 входит в группу admins ?

Gnix
мл. сержант
Сообщения: 127
Зарегистрирован: 2008-03-21 2:50:24
Откуда: Ukraine, Kiev
Контактная информация:

Re: proftpd+mysql

Непрочитанное сообщение Gnix » 2008-03-21 4:58:29

помогите. :!:
такая же проблема с авторизацией анонимуса Просит пароль а потом сыпет в логах такое:

Код: Выделить всё

Mar 21 03:52:30 gnix.net proftpd[1234] gnix.net (::ffff:ip[::ffff:ip]): mod_clamav/0.5: warning: No local socket was specified.
Mar 21 03:52:30 gnix.net proftpd[1234] gnix.net (::ffff:ip[::ffff:ip]): FTP session opened.
Mar 21 03:52:30 gnix.net proftpd[1234] gnix.net (::ffff:ip[::ffff:ip]): no such user 'anonymous'
Mar 21 03:52:30 gnix.net proftpd[1234] gnix.net (::ffff:ip[::ffff:ip]): USER anonymous: no such user found from ::ffff:ip [::ffff:ip] to ::ffff:ip
Mar 21 03:54:47 gnix.net proftpd[1234] gnix.net (::ffff:ip[::ffff:ip]): FTP session closed.
О_о
Че делать? нужно помощь новичку

AzureZ
мл. сержант
Сообщения: 124
Зарегистрирован: 2007-11-06 17:07:27
Откуда: Москва

Re: proftpd+mysql

Непрочитанное сообщение AzureZ » 2008-03-21 10:03:27

Конфиг покажите

Gnix
мл. сержант
Сообщения: 127
Зарегистрирован: 2008-03-21 2:50:24
Откуда: Ukraine, Kiev
Контактная информация:

Re: proftpd+mysql

Непрочитанное сообщение Gnix » 2008-03-21 18:32:49

Код: Выделить всё

ServerName "ip"
ServerType standalone
DefaultServer on
Umask 022
ServerAdmin support@microsoft.com
IdentLookups off
UseReverseDNS off
Port 21
ScoreboardFile         /var/run/proftpd.scoreboard
PassivePorts 49152 65534
TimesGMT off
MaxInstances 30
MaxLoginAttempts 100
TimeoutLogin 3000
TimeoutNoTransfer 1200
TimeoutIdle 1200
User nobody
Group nogroup
DefaultTransferMode binary
AllowForeignAddress on
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores off
SystemLog /var/log/secure
<IfModule mod_tls.c>
TLSEngine off
TLSRequired off
TLSVerifyClient off
TLSProtocol TLSv1
TLSLog /var/log/proftpd_tls.log
</IfModule>

<Anonymous /var/ftp>
User anonymous
Group nogroup
AnonRequirePassword off
MaxClients 8 "The server is full, hosting %m users"
UserRatio anonymous 0 0 0 0
<Limit LOGIN>
Order allow,deny
Allow from 194.187.48.,194.187.49.,194.187.50.,194.187.51.
Deny from all
</Limit>
<Limit LIST NLST  RETR  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
</Limit>
<Limit STOR STOU  APPE  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE  SITE_CHMOD  SITE_CHGRP  MTDM >
 DenyAll
</Limit>
<Directory /var/ftp/incoming>
AllowOverwrite on
<Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
</Limit>
<Limit SITE_CHMOD  SITE_CHGRP  MTDM >
 DenyAll
</Limit>
</Directory>
</Anonymous>

AzureZ
мл. сержант
Сообщения: 124
Зарегистрирован: 2007-11-06 17:07:27
Откуда: Москва

Re: proftpd+mysql

Непрочитанное сообщение AzureZ » 2008-03-22 10:48:25

А пользователь anonymous есть в системе??
Попробуйте добавить в секцию Анонимусов

Код: Выделить всё

UserAlias                    anonymous ftp
и заменить

Код: Выделить всё

User anonymous 
на

Код: Выделить всё

User                         ftp

Gnix
мл. сержант
Сообщения: 127
Зарегистрирован: 2008-03-21 2:50:24
Откуда: Ukraine, Kiev
Контактная информация:

Re: proftpd+mysql

Непрочитанное сообщение Gnix » 2008-03-22 22:33:49

анонимуса в системе не было
создал анонимуса через adduser
Username : anonymous
Password : <disabled>
Full Name : anonymous
Uid : 1003
Class :
Groups : nogroup
Home : /home/anonymous
Shell : /bin/sh
Locked : no
не пускает :(

с ftp не пускает тоже

AzureZ
мл. сержант
Сообщения: 124
Зарегистрирован: 2007-11-06 17:07:27
Откуда: Москва

Re: proftpd+mysql

Непрочитанное сообщение AzureZ » 2008-03-23 0:43:42

Попробуйте запустить proftpd так

Код: Выделить всё

proftpd -n
и смотрите ошибки. Или для более подробной инфы с дебагом

Аватара пользователя
hizel
дядя поня
Сообщения: 9031
Зарегистрирован: 2007-06-29 10:05:02
Откуда: Выборг

Re: proftpd+mysql

Непрочитанное сообщение hizel » 2008-03-23 0:56:52

вверху у него подробный вывод с дебагом
proftpd -nd 10
В дурацкие игры он не играет. Он просто жуткий, чу-чу, паровозик, и зовут его Блейн. Блейн --- это Боль.

Gnix
мл. сержант
Сообщения: 127
Зарегистрирован: 2008-03-21 2:50:24
Откуда: Ukraine, Kiev
Контактная информация:

Re: proftpd+mysql

Непрочитанное сообщение Gnix » 2008-03-23 1:01:41

все разобрался

помойму adduser anonymous помогло после перезагрузки системы

я тока 2 недели с FreeBSD - толком ничего незнаю :roll:

спасибо всем

Аватара пользователя
hizel
дядя поня
Сообщения: 9031
Зарегистрирован: 2007-06-29 10:05:02
Откуда: Выборг

Re: proftpd+mysql

Непрочитанное сообщение hizel » 2008-03-23 9:45:10

эм, вроде как логин\пароль у вас из Mysql должно браться
йа никогда ананимуса не добавлял при настройках ftp серверов :/
В дурацкие игры он не играет. Он просто жуткий, чу-чу, паровозик, и зовут его Блейн. Блейн --- это Боль.

AzureZ
мл. сержант
Сообщения: 124
Зарегистрирован: 2007-11-06 17:07:27
Откуда: Москва

Re: proftpd+mysql

Непрочитанное сообщение AzureZ » 2008-03-23 11:19:03

Ну судя по выложенному конфигу, proftpd не работает в связке с mysql. Да и зачем добавлять анонимуса, если уже есть в системе пользователь ftp на который нужно сделать алиас.