The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Proftpd и кодировка"
Вариант для распечатки  
Пред. тема | След. тема 
Форум Открытые системы на сервере (FTP / Linux)
Изначальное сообщение [ Отслеживать ]

"Proftpd и кодировка"  +/
Сообщение от Александр Логинов (ok), 02-Ноя-09, 20:08 
Здравствуйте.

Поднимаю небольшой ftp сервер на proftpd в связке с postgresql.
При использовани директив LangEngine и UseEncoding не могу подключиться к серверу удалённо (flashfxp, totalcommander), локально (через команду ftp) или без использования данных директив в конфиге proftpd подлючение происходит нормально, но проблемы с отображением руссиких букв в названии файлов и созданием папок содержаших букву 'я'. Как решить проблему?

Proftpd 1.3.2b

Локаль
--------------------------
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

Конфиг proftpd
-------------------------------
ServerName                      "FTP"
ServerType                      standalone
ServerAdmin                     "xxx@xxx.xx"

SyslogLevel                     debug
SystemLog                       /var/log/proftpd.log

DefaultServer                   on

Port                            21

UseIPv6                         off

Umask                           022

MaxInstances                    30
CommandBufferSize               512

User                            proftp
Group                           proftp

UseReverseDNS                   off
IdentLookups                    off

RequireValidShell               off

DefaultRoot                     ~

LangEngine                     on
UseEncoding                    UTF-8 CP1251


<Directory ~>

        AllowOverwrite on

        <Limit Write>
                AllowAll
        </Limit>

        <Limit Read>
                AllowAll
        </Limit>

</Directory>

SQLAuthTypes        Plaintext
SQLBackend          postgresql
SQLAuthenticate     users
SQLConnectInfo      proftp@127.0.0.1 proftp 1234zaqwe1234
SQLUserInfo         users username password uid gid homedir shell
SQLMinUserUID       500
SQLMinUserGID       500

SQLDefaultGID       502

SQLLogFile          /var/log/proftpdsql.log


Логи при подключении локально
-----------------------------------------------
localhost (127.0.0.1[127.0.0.1]) - setting CommandBufferSize to 512
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER A_User' t
o mod_rewrite
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER A_User' t
o mod_tls
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER A_User' t
o mod_core
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER A_User' t
o mod_core
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER A_User' t
o mod_delay
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER A_User' t
o mod_auth
localhost (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER A_User' to mo
d_ratio
localhost (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER A_User' to mo
d_auth
localhost (127.0.0.1[127.0.0.1]) - no supplemental groups found for user 'A_User'

localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER A_User'
to mod_sql
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER A_User'
to mod_delay
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER A_User' t
o mod_sql
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER A_User' t
o mod_log
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_rewrite
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_tls
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_core
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_core
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_wrap
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_radius
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_sql
localhost (127.0.0.1[127.0.0.1]) - no supplemental groups found for user 'A_User'
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_delay
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' t
o mod_auth
localhost (127.0.0.1[127.0.0.1]) - dispatching CMD command 'PASS (hidden)' to mo
d_auth
localhost (127.0.0.1[127.0.0.1]) - retrieved UID 502 for user 'A_User'
localhost (127.0.0.1[127.0.0.1]) - user 'A_User' authenticated by mod_sql.c
localhost (127.0.0.1[127.0.0.1]) - ROOT PRIVS at auth.c:1213
localhost (127.0.0.1[127.0.0.1]) - RELINQUISH PRIVS at auth.c:1215
localhost (127.0.0.1[127.0.0.1]) - USER PRIVS 502 at mod_auth.c:1048
localhost (127.0.0.1[127.0.0.1]) - RELINQUISH PRIVS at mod_auth.c:1050
localhost (127.0.0.1[127.0.0.1]) - retrieved UID 502 for user 'A_User'
localhost (127.0.0.1[127.0.0.1]) -
localhost (127.0.0.1[127.0.0.1]) - Config for FTP:
localhost (127.0.0.1[127.0.0.1]) - /srvftp/A_User
localhost (127.0.0.1[127.0.0.1]) -  Limit
localhost (127.0.0.1[127.0.0.1]) -   AllowAll
localhost (127.0.0.1[127.0.0.1]) -  Limit
localhost (127.0.0.1[127.0.0.1]) -   AllowAll
localhost (127.0.0.1[127.0.0.1]) -  AllowOverwrite
localhost (127.0.0.1[127.0.0.1]) -  Umask
localhost (127.0.0.1[127.0.0.1]) -  RequireValidShell
localhost (127.0.0.1[127.0.0.1]) -  SQLAuthTypes
localhost (127.0.0.1[127.0.0.1]) -  SQLAuthenticate
localhost (127.0.0.1[127.0.0.1]) -  SQLConnectInfo
localhost (127.0.0.1[127.0.0.1]) -  SQLMinUserUID
localhost (127.0.0.1[127.0.0.1]) -  SQLMinUserGID
localhost (127.0.0.1[127.0.0.1]) -  SQLDefaultGID
localhost (127.0.0.1[127.0.0.1]) - SyslogLevel
localhost (127.0.0.1[127.0.0.1]) - DefaultServer
localhost (127.0.0.1[127.0.0.1]) - Umask
localhost (127.0.0.1[127.0.0.1]) - CommandBufferSize
localhost (127.0.0.1[127.0.0.1]) - UserID
localhost (127.0.0.1[127.0.0.1]) - UserName
localhost (127.0.0.1[127.0.0.1]) - GroupID
localhost (127.0.0.1[127.0.0.1]) - GroupName
localhost (127.0.0.1[127.0.0.1]) - IdentLookups
localhost (127.0.0.1[127.0.0.1]) - IdentLookups
localhost (127.0.0.1[127.0.0.1]) - RequireValidShell
localhost (127.0.0.1[127.0.0.1]) - DefaultRoot
localhost (127.0.0.1[127.0.0.1]) - LangEngine
localhost (127.0.0.1[127.0.0.1]) - UseEncoding
localhost (127.0.0.1[127.0.0.1]) - AuthOrder
localhost (127.0.0.1[127.0.0.1]) - SQLAuthTypes
localhost (127.0.0.1[127.0.0.1]) - SQLBackend
localhost (127.0.0.1[127.0.0.1]) - SQLAuthenticate
localhost (127.0.0.1[127.0.0.1]) - SQLConnectInfo
localhost (127.0.0.1[127.0.0.1]) - SQLUserTable
localhost (127.0.0.1[127.0.0.1]) - SQLUsernameField
localhost (127.0.0.1[127.0.0.1]) - SQLPasswordField
localhost (127.0.0.1[127.0.0.1]) - SQLUidField
localhost (127.0.0.1[127.0.0.1]) - SQLGidField
localhost (127.0.0.1[127.0.0.1]) - SQLHomedirField
localhost (127.0.0.1[127.0.0.1]) - SQLShellField
localhost (127.0.0.1[127.0.0.1]) - SQLMinUserUID
localhost (127.0.0.1[127.0.0.1]) - SQLMinUserGID
localhost (127.0.0.1[127.0.0.1]) - SQLDefaultGID
localhost (127.0.0.1[127.0.0.1]) - SQLLogFile
localhost (127.0.0.1[127.0.0.1]) - CURRENT-CLIENTS
localhost (127.0.0.1[127.0.0.1]) - USER
localhost (127.0.0.1[127.0.0.1]) - ROOT PRIVS at mod_auth.c:1118
localhost (127.0.0.1[127.0.0.1]) - opening TransferLog '/var/log/xferlog'
localhost (127.0.0.1[127.0.0.1]) - setting group IDs:
localhost (127.0.0.1[127.0.0.1]) - RELINQUISH PRIVS at mod_auth.c:1155
localhost (127.0.0.1[127.0.0.1]) - USER PRIVS 502 at mod_auth.c:567
localhost (127.0.0.1[127.0.0.1]) - retrieved UID 502 for user 'A_User'
localhost (127.0.0.1[127.0.0.1]) - RELINQUISH PRIVS at mod_auth.c:571
localhost (127.0.0.1[127.0.0.1]) - set TZ environment variable to 'ALMT'
localhost (127.0.0.1[127.0.0.1]) - Preparing to chroot to directory '/srvftp/A_User'
localhost (127.0.0.1[127.0.0.1]) - ROOT PRIVS at auth.c:1317
localhost (127.0.0.1[127.0.0.1]) - RELINQUISH PRIVS at auth.c:1319
localhost (127.0.0.1[127.0.0.1]) - Environment successfully chroot()ed
localhost (127.0.0.1[127.0.0.1]) - ROOT PRIVS at mod_auth.c:1199
localhost (127.0.0.1[127.0.0.1]) - SETUP PRIVS at mod_auth.c:1206
localhost (127.0.0.1[127.0.0.1]) - in dir_check_full(): path = '/', fullpath = '
/srvftp/A_User/'.
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_sql
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_cap
localhost (127.0.0.1[127.0.0.1]) - mod_cap/1.0: capabilities '= cap_net_bind_ser
vice,cap_audit_write+ep'
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_ifsession
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_readme
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_radius
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_tls
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_ratio
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_quotatab
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_delay
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_log
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_ls
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_auth
localhost (127.0.0.1[127.0.0.1]) - PRIVS_RELINQUISH: ID switching disabled
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_xfer
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'PASS (hidden)'
to mod_core
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' t
o mod_sql
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' t
o mod_log
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' t
o mod_ratio
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'PASS (hidden)' t
o mod_auth
localhost (127.0.0.1[127.0.0.1]) - USER A_User: Login successful.
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_rew
rite
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_tls
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_cor
e
localhost (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'SYST' to mod_cor
e
localhost (127.0.0.1[127.0.0.1]) - dispatching CMD command 'SYST' to mod_core
localhost (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'SYST' to mod_sq
l
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'SYST' to mod_sql
localhost (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'SYST' to mod_log

Логи при подключении удалённо
-----------------------------------------------
localhost - ~
localhost -  Limit
localhost -   AllowAll
localhost -  Limit
localhost -   AllowAll
localhost -  AllowOverwrite
localhost -  Umask
localhost -  RequireValidShell
localhost -  SQLAuthTypes
localhost -  SQLAuthenticate
localhost -  SQLConnectInfo
localhost -  SQLMinUserUID
localhost -  SQLMinUserGID
localhost -  SQLDefaultGID
localhost - SyslogLevel
localhost - DefaultServer
localhost - Umask
localhost - CommandBufferSize
localhost - UserID
localhost - UserName
localhost - GroupID
localhost - GroupName
localhost - IdentLookups
localhost - IdentLookups
localhost - RequireValidShell
localhost - DefaultRoot
localhost - LangEngine
localhost - UseEncoding
localhost - AuthOrder
localhost - SQLAuthTypes
localhost - SQLBackend
localhost - SQLAuthenticate
localhost - SQLConnectInfo
localhost - SQLUserTable
localhost - SQLUsernameField
localhost - SQLPasswordField
localhost - SQLUidField
localhost - SQLGidField
localhost - SQLHomedirField
localhost - SQLShellField
localhost - SQLMinUserUID
localhost - SQLMinUserGID
localhost - SQLDefaultGID
localhost - SQLLogFile
localhost - ROOT PRIVS at mod_delay.c:307
localhost - RELINQUISH PRIVS at mod_delay.c:309
localhost - mod_lang/0.9: using ru_RU.UTF-8 messages
localhost - mod_lang/0.9: binding to text domain 'proftpd' using locale path '/usr/local/proftpd/share/locale'
localhost - mod_lang/0.9: using locale files in '/usr/local/proftpd/share/locale'
localhost - mod_lang/0.9: added the following supported languages: bg_BG, zh_CN, fr_FR, ru_RU, ko_KR, it_IT, en_US
localhost - retrieved group ID: 502
localhost - setting group ID: 502
localhost - SETUP PRIVS at main.c:3015
localhost - ROOT PRIVS at main.c:2125
localhost - RELINQUISH PRIVS at main.c:2132
localhost - ROOT PRIVS at main.c:2460
localhost - opening scoreboard '/usr/local/proftpd/var/proftpd/proftpd.scoreboard'
localhost - RELINQUISH PRIVS at main.c:2486
localhost - ROOT PRIVS at inet.c:336
localhost - RELINQUISH PRIVS at inet.c:399
localhost - ProFTPD 1.3.2b (maint) (built РЎР±С‚ РћРєС‚ 31 22:32:17 ALMT 2009) standalone mode STARTUP
localhost - ROOT PRIVS at pidfile.c:42
localhost - RELINQUISH PRIVS at pidfile.c:44
localhost - ROOT PRIVS at main.c:1228
localhost - RELINQUISH PRIVS at main.c:1232
localhost - no matching vhost found for 192.168.1.20#21, using DefaultServer 'FTP'
localhost (95.58.179.232[95.58.179.232]) - ROOT PRIVS at main.c:1076
localhost (95.58.179.232[95.58.179.232]) - SETUP PRIVS at main.c:1081
localhost (95.58.179.232[95.58.179.232]) - session requested from client in unknown class
localhost (95.58.179.232[95.58.179.232]) - performing module session initializations
localhost (95.58.179.232[95.58.179.232]) - mod_lang/0.9: using ru_RU.UTF-8 messages
localhost (95.58.179.232[95.58.179.232]) - mod_lang/0.9: using ru_RU.UTF-8 messages
localhost (95.58.179.232[95.58.179.232]) - mod_lang/0.9: using local charset 'UTF-8', client charset 'CP1251' for path encoding
localhost (95.58.179.232[95.58.179.232]) - mod_cap/1.0: adding CAP_AUDIT_WRITE capability
localhost (95.58.179.232[95.58.179.232]) - ROOT PRIVS at mod_sql.c:4337
localhost (95.58.179.232[95.58.179.232]) - RELINQUISH PRIVS at mod_sql.c:4339
localhost (95.58.179.232[95.58.179.232]) - mod_sql/4.2.2: defaulting to 'postgres' backend
localhost (95.58.179.232[95.58.179.232]) - mod_ident/1.0: ident lookup disabled
localhost (95.58.179.232[95.58.179.232]) - ROOT PRIVS at mod_delay.c:1283
localhost (95.58.179.232[95.58.179.232]) - RELINQUISH PRIVS at mod_delay.c:1285
localhost (95.58.179.232[95.58.179.232]) - ROOT PRIVS at mod_auth.c:117
localhost (95.58.179.232[95.58.179.232]) - opening scoreboard '/usr/local/proftpd/var/proftpd/proftpd.scoreboard'
localhost (95.58.179.232[95.58.179.232]) - RELINQUISH PRIVS at mod_auth.c:119
localhost (95.58.179.232[95.58.179.232]) - AuthOrder in effect, resetting auth module order
localhost (95.58.179.232[95.58.179.232]) - connected - local  : 192.168.1.20:21
localhost (95.58.179.232[95.58.179.232]) - connected - remote : 95.58.179.232:2765
localhost (95.58.179.232[95.58.179.232]) - FTP session opened.
localhost (95.58.179.232[95.58.179.232]) - setting CommandBufferSize to 512
localhost (95.58.179.232[95.58.179.232]) - dispatching PRE_CMD command 'USER A_User' to mod_rewrite
localhost (95.58.179.232[95.58.179.232]) - dispatching PRE_CMD command 'USER A_User' to mod_tls
localhost (95.58.179.232[95.58.179.232]) - dispatching PRE_CMD command 'USER A_User' to mod_core
localhost (95.58.179.232[95.58.179.232]) - dispatching PRE_CMD command 'USER A_User' to mod_core
localhost (95.58.179.232[95.58.179.232]) - dispatching PRE_CMD command 'USER A_User' to mod_delay
localhost (95.58.179.232[95.58.179.232]) - dispatching PRE_CMD command 'USER A_User' to mod_auth
localhost (95.58.179.232[95.58.179.232]) - dispatching CMD command 'USER A_User' to mod_ratio
localhost (95.58.179.232[95.58.179.232]) - dispatching CMD command 'USER A_User' to mod_auth
localhost (95.58.179.232[95.58.179.232]) - no supplemental groups found for user 'A_User'
localhost (95.58.179.232[95.58.179.232]) - dispatching POST_CMD command 'USER A_User' to mod_sql
localhost (95.58.179.232[95.58.179.232]) - dispatching POST_CMD command 'USER A_User' to mod_delay
localhost (95.58.179.232[95.58.179.232]) - dispatching LOG_CMD command 'USER A_User' to mod_sql
localhost (95.58.179.232[95.58.179.232]) - dispatching LOG_CMD command 'USER A_User' to mod_log
localhost (95.58.179.232[95.58.179.232]) - FTP session closed.


Заранее спасибо.

С уважение Александр.


Ответить | Правка | Cообщить модератору

Оглавление

Сообщения [Сортировка по времени | RSS]


1. "Proftpd и кодировка"  +/
Сообщение от Александр Логинов (ok), 02-Ноя-09, 21:05 
Проблема с подключением и отображением русских букв снята. Добавил в конфиг некоторые директивы и всё заработало:

LangDefault                     ru_RU.uft8
LangEngine                      on
LangPath                        /usr/share/locale
UseEncoding                     UTF-8 WINDOWS-1251


Как решить проблему связанную с буквой 'я'?

Ответить | Правка | Наверх | Cообщить модератору

2. "Proftpd и кодировка"  +/
Сообщение от Exit (?), 09-Фев-10, 19:57 
Спасибо.. Единственное, что помогло.. Спасибо еще раз.
Ответить | Правка | Наверх | Cообщить модератору

3. "Proftpd и кодировка"  +/
Сообщение от Sanya (??), 07-Июл-11, 11:19 
Помогло. Спасибо!
Ответить | Правка | К родителю #1 | Наверх | Cообщить модератору

4. "Proftpd и кодировка"  +/
Сообщение от Михаилemail (??), 16-Окт-21, 19:37 
LangDefault ru_RU.uft8 - это язык на котором будет отвечать сервер на FTP команды я думаю лучше оставить en_US

UseEncoding UTF-8 WINDOWS-1251

Это решает проблему с кириллицей, но и создаёт геморрой. Клиент обязан работать в cp1251 что-бы загружать файлы или папки с кириллицей в названии :(( Если клиент будет работать в UTF-8 то загружая такие файлы или папки крокозябры будут уже не в выдаваемом списке а в файлах на самом FTP сервере и наоборот тоже самое.

Вот как это решить блин :((

Один геморрой заменяется на другой :((

FileZilla с ProFTPd рабртает судя по всему в cp1251 но в тоже время работает в UTF-8 с другими FTP серверами отправляет файлы или папки с кириллицей в названии и получает список файлов в том-же UTF-8 без каких либо проблем :((

Ответить | Правка | К родителю #1 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру