Bug 1036 - ???????? instead of russian names of files and directories in vsftpd.log
: ???????? instead of russian names of files and directories in vsftpd.log
Status: RESOLVED INVALID
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Marathon
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-31 13:30 MSK by FirstLevel
Modified: 2012-12-25 09:32 MSK (History)
4 users (show)

See Also:
RPM Package: vsftpd-2.3.4-5-rosa.lts2012.0.x86_64
ISO-related:
Bad POT generating:
Upstream:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FirstLevel 2012-10-31 13:30:05 MSK
Description of problem:
When I uploaded to ftp server files with russian names or when I uploaded to directory with russian names I have such strings in vsftpd.log

Tue Oct 30 10:48:06 2012 1 176.119.240.2 10 /??????????????????/test.txt a _ i r sasha ftp 0 * c

This is copying file into directory "Документы". 

# uname -a
Linux localhost.localdomain 3.0.38-nrj-desktop-1rosa.lts #1 SMP PREEMPT Tue Jul 24 11:00:04 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


# locale
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=


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Aleksandr Kazantcev 2012-10-31 13:48:46 MSK
If you has broken name on server?

And if you manually upload files, is output ftp server correct?
Comment 2 Dmitry 2012-10-31 14:43:35 MSK
Usually server runs under its own system user. So, those variables won't work at all.

What editor does the user use to read logs? Can it try another editor?
???? - is a symbol of liberal convertion non-ASCII to ASCII. Such conversion may occur in vsftpd, or in logging system, or in editor.
Comment 3 Dmitry 2012-10-31 15:04:34 MSK
Oh, my mistake, vsftpd may run under local user if it logs in ftp as local user )) So, locales can have meaning
Comment 4 Dmitry 2012-10-31 15:10:25 MSK
Can user login to his ftp server and then type 'ps' or 'ps | grep ftp' and provide output for us?
Comment 5 FirstLevel 2012-10-31 17:41:51 MSK
(In reply to comment #4)
> Can user login to his ftp server and then type 'ps' or 'ps | grep ftp' and
> provide output for us?

 2255 ?        SNs    0:00 vsftpd /etc/vsftpd/vsftpd.conf

vsftpd is starting through xinet.d
service ftp
{
        disable                 = no
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/vsftpd
        server_args             = /etc/vsftpd/vsftpd.conf
        nice                    = 10
        per_source              = 5
        instances               = 200
        #banner_fail             = /etc/vsftpd/busy_banner
        log_on_success          += PID HOST DURATION
        log_on_failure          += HOST
        flags                   = IPv4
}
Comment 6 Dmitry Mikhirev 2012-12-22 15:14:13 MSK
The restriction of FTP protocol is that it does not handle charsets properly. Seems that client used non-UTF8 charset (probably CP1251), so filenames in log are saved in this charset. It is impossible to fix this issue. I recommend using other protocols instead obsolete FTP or, if FTP is necessary for some reason, use only ASCII characters in file names.
Comment 7 FirstLevel 2012-12-23 17:02:06 MSK
Please could You ask why in proftpd user has russian symbols in logs?

Wed Dec 19 07:44:52 2012 0 176.119.240.2 960 /home/denwd/www/Спирит,_маинкрафт/images/21.png b _ i r denwd ftp 0 * c
Wed Dec 19 07:44:52 2012 0 176.119.240.2 955 /home/denwd/www/Спирит,_маинкрафт/images/223.png b _ i r denwd ftp 0 * c
Wed Dec 19 07:44:53 2012 0 176.119.240.2 1244 /home/denwd/www/Спирит,_маинкрафт/images/Без-имени-1.png b _ i r denwd ftp 0 * c


vsftpd-2.3.4-5-rosa.lts2012.0.x86_64
Comment 8 Dmitry Mikhirev 2012-12-24 13:23:31 MSK
(In reply to comment #7)
> Please could You ask why in proftpd user has russian symbols in logs?
> 
> Wed Dec 19 07:44:52 2012 0 176.119.240.2 960
> /home/denwd/www/Спирит,_маинкрафт/images/21.png b _ i r denwd ftp 0 * c
> Wed Dec 19 07:44:52 2012 0 176.119.240.2 955
> /home/denwd/www/Спирит,_маинкрафт/images/223.png b _ i r denwd ftp 0 * c
> Wed Dec 19 07:44:53 2012 0 176.119.240.2 1244
> /home/denwd/www/Спирит,_маинкрафт/images/Без-имени-1.png b _ i r denwd ftp 0
> * c
> 
> 
> vsftpd-2.3.4-5-rosa.lts2012.0.x86_64

Probably because proftpd can decode charsets, but vsftpd can not. There is modified version of vsftpd, vsftpd-ext (http://vsftpd.devnet.ru/), that is able to work with different charsets (if being properly configured). If you want to see it in repos, feel free to open a package request.

Note that noone FTP server can assure proper handling of cyrillic characters. It can work correctly in some particular cases but transform text to something unreadable in other. That's why I recommend not using FTP.
Comment 9 FirstLevel 2012-12-25 09:32:59 MSK
(In reply to comment #8)
> (In reply to comment #7)
> > Please could You ask why in proftpd user has russian symbols in logs?
> > 
> > Wed Dec 19 07:44:52 2012 0 176.119.240.2 960
> > /home/denwd/www/Спирит,_маинкрафт/images/21.png b _ i r denwd ftp 0 * c
> > Wed Dec 19 07:44:52 2012 0 176.119.240.2 955
> > /home/denwd/www/Спирит,_маинкрафт/images/223.png b _ i r denwd ftp 0 * c
> > Wed Dec 19 07:44:53 2012 0 176.119.240.2 1244
> > /home/denwd/www/Спирит,_маинкрафт/images/Без-имени-1.png b _ i r denwd ftp 0
> > * c
> > 
> > 
> > vsftpd-2.3.4-5-rosa.lts2012.0.x86_64
> 
> Probably because proftpd can decode charsets, but vsftpd can not. There is
> modified version of vsftpd, vsftpd-ext (http://vsftpd.devnet.ru/), that is
> able to work with different charsets (if being properly configured). If you
> want to see it in repos, feel free to open a package request.
> 
> Note that noone FTP server can assure proper handling of cyrillic
> characters. It can work correctly in some particular cases but transform
> text to something unreadable in other. That's why I recommend not using FTP.

Ok. I have created feature request to build vsftpd-ext