выбор кодировки... (локаль и фтп)

Софт под Linux, разные программы, но только связанные с Linux

Модератор: /dev/random

Аватара пользователя
delphi
Сообщения: 254

выбор кодировки...

Сообщение delphi »

кароче где я тут уже писал...есть куча виндовых юзеров,ходящих на линовый фтп.спросил на ЛОРе-посоветовали поставить юникод как локаль...стоит попробовать?на сока я помню,када я мантировал ntfs разделы,они хорошо читались Инет Эксплоером (IE)-тоесть без изменения руками кодировки...стоит попробовать?как думаете?
Спасибо сказали:
Аватара пользователя
delphi
Сообщения: 254

Re: выбор кодировки...

Сообщение delphi »

пардон,ну что не кто не ответит?
Спасибо сказали:
Аватара пользователя
clx
Сообщения: 3121
Статус: Think Different !
ОС: Mac OS X

Re: выбор кодировки...

Сообщение clx »

А не проще в настройках фтп-сервера выставить CP1251 и не париться?
iMac 20" Core Duo.
Спасибо сказали:
Аватара пользователя
delphi
Сообщения: 254

Re: выбор кодировки...

Сообщение delphi »

а где там в конфиге cp1251
[delphi@localhost delphi]$ cat /usr/local/etc/proftpd.conf
# 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 "SeverNet FTP Server"
ServerType standalone
DefaultServer on

# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart 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

# Set the user and group under which the server will run.
User nobody
Group ftp

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

# Define the log formats
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"

# Needed for NIS.

PersistentPasswd off

# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:
#
# DefaultRoot /home/foo foo
Include /usr/local/etc/proftpd-anonymous.conf


и анонимус кофн
[delphi@localhost delphi]$ cat /usr/local/etc/proftpd-anonymous.conf
# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
AccessGrantMsg "Delphi is watching you =)"
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp

# Limit the maximum number of anonymous logins
MaxClients 2 "Sorry, max %m users -- try it later"

# Put the user into /pub right after login
DefaultChdir /

# We want 'welcome.msg' displayed at login, '.message' displayed in
# each newly chdired directory and tell users to read README* files.
DisplayLogin /welcome.msg
DisplayFirstChdir .message


# Some more cosmetic and not vital stuff
DirFakeUser on ftpadm
DirFakeGroup on ftpadm

# Don't make it require a valid password or shell.
RequireValidShell off
AnonRequirePassword off

# An upload directory that allows storing files but not retrieving
# or creating directories.
<Directory incoming/*>
AllowOverwrite on
<Limit READ>
AllowAll
</Limit>

<Limit STOR>
AllowAll
</Limit>
</Directory>

# Don't write anonymous accesses to the system wtmp file (good idea!)
WtmpLog off

# Logging for the anonymous transfers
ExtendedLog /var/log/proftpd/access.log WRITE,READ default
ExtendedLog /var/log/proftpd/auth.log AUTH auth

</Anonymous>

ну и где там про перекодировку?или нада что то добавить?
Спасибо сказали:
Аватара пользователя
clx
Сообщения: 3121
Статус: Think Different !
ОС: Mac OS X

Re: выбор кодировки...

Сообщение clx »

iMac 20" Core Duo.
Спасибо сказали:
hudbrog
Сообщения: 85

Re: выбор кодировки...

Сообщение hudbrog »

хмм... имхо два основных варианта.
1)использовать как локаль cp151. возможно, если извратиться, можно запустить ftpd в chroot'е, и там ему локаль выставить cp1251, а всей остальной системе оставить как есть.
2)пользовать всякие там скриптики для перекодировки имен и переименовки файлов соответственно новым именам %) иногда патчи всякие. не видел ни разу нормальной реализации.
но вообще, русские имена на фтп - это изначально довольно плохая идея. там, насколько я помню, серьезный косяк с буковкой "я" в названиях получается...
Спасибо сказали:
Аватара пользователя
delphi
Сообщения: 254

Re: выбор кодировки...

Сообщение delphi »

а может UTF ?
Спасибо сказали:
Аватара пользователя
KiWi
Бывший модератор
Сообщения: 2521
Статус: статус, статус, статус

Re: выбор кодировки...

Сообщение KiWi »

hudbrog писал(а):
22.10.2005 18:27
2)пользовать всякие там скриптики для перекодировки имен и переименовки файлов соответственно новым именам %) иногда патчи всякие. не видел ни разу нормальной реализации.
но вообще, русские имена на фтп - это изначально довольно плохая идея. там, насколько я помню, серьезный косяк с буковкой "я" в названиях получается...

1. с ё вроде
2. лечится патчем
3. ссылка на воркающий патч для перекодировки выше
Спасибо сказали: