1838646 Members
2545 Online
110128 Solutions
New Discussion

ftpd and LANG

 
SOLVED
Go to solution
Miguel Covas
Advisor

ftpd and LANG

I've been aware for a couple of years that since the release of HP-UX 10.20 Netscape browsers were unable to display directories properly when accessing via ftp protocol. Moreover, I've seen recently that some graphical ftp clients were unable to display properly the file system tree. With some pains we were able to install a HP-UX server on the public branch of our firewall and allow several providers to test their ftp clients software. They were able to fix the problem and told us that it was mainly the way in which ftpd displayed the directory listing.
We are using HP-UX in Spain and it seems that it comes localized. Although our users very seldom use localization.
The question is that ftpd decides to display directory listing with dates in Spanish format. Some ftp clients get confused dealing with dates. If I issue a ll command on a certain directory I get:
-rw-rw-rw- 1 jcl sag 1353 May 29 2001 xxx
-rwxr-xr-x 1 root sag 0 Jun 14 12:48 xxxx

If I set LANG=es_ES.iso88591 and export LANG I'll get

-rw-rw-rw- 1 jcl sag 1353 29 May 2001 xxx
-rwxr-xr-x 1 root sag 0 14 Jun 12:48 xxxx

Which is what I get if I ftp the machine and list the directory.

It seems that ftpd is started whith LANG initialized. Since there is no need for end users to use that feature...
Would it be possible to start ftpd without that LANG?
1 REPLY 1
sven verhaegen
Respected Contributor
Solution

Re: ftpd and LANG

Hi i found some info that could help you , in fact there exist some information within hP stating that it is not FTP that sets the LANg but that it read it trought the INETD (which controls ftp) which uses the LANg it got at startup , there would be ways around this by either , exporting LANG=C ,

export LANG=C
/usr/sbin/inetd -k
/usr/sbin/inetd

to force it to re-launch ftp this time with LANG setting C and not the localised , to make that permanent you would have to change in fact the /etc/rc.config.d/LANG file to reflect C instead of the localised language (you need to restard inetd for it to have effect at all)
...knowing one ignores a greath many things is the first step to wisdom...