- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftpd and language and date. How to change?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 06:45 AM
тАО05-04-2009 06:45 AM
I have i problem i need to solve quick.
We have an application that does a FTP to one of our HP-UX machines. The ftp client can not interpret the date-line that is in our locale Swedish. In Swedish May is Maj. This was not a problem on our old Unix machines. If i use windows built in ftp-client and do ls -l it shows Maj 4 16:37 MYfile.foo
But with ssh it shows May 4 16:37 MYfile.foo
How can i change this for the ftpd?
Br
Patrik
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 07:36 AM
тАО05-04-2009 07:36 AM
SolutionYour ftpd has inherited its locale environment variable settings from somewhere. Was it (re)started manually after a system boot? If so, the setting may have come from the session of the sysadmin that started it.
You need to set the LC_ALL environment variable for ftpd to explicitly override all locale definitions and force the POSIX standard behaviour in all language-related matters.
This setting is:
export LC_ALL="C"
See "man 5 environ", "man 5 lang" and "man locale" for more information.
Is your ftpd configured to run stand-alone or by inetd? (If stand-alone, the ftpd process is always running; if by inetd, only when someone has established a FTP connection.)
If your ftpd is started by inetd (the default set-up on HP-UX), you should place the locale setting (above) in the beginning of the /sbin/init.d/inetd script.
Then stop & restart inetd. All new ftpd processes should inherit the new setting from inetd.
If your ftpd runs stand-alone (e.g. the optional wu-ftpd from HP), place the locale setting in the beginning of the ftpd startup script, then stop and restart your ftpd.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 08:07 AM
тАО05-04-2009 08:07 AM
Re: ftpd and language and date. How to change?
ftpd takes what it takes from the system default language.
Most people using ftp actually expect english prompts.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 08:44 AM
тАО05-04-2009 08:44 AM
Re: ftpd and language and date. How to change?
If you don't want to make the change for
_everything_ inetd starts, then you might
try writing a wrapper script for ftpd, and
setting the desired environment in it before
it runs the real ftpd. Then edit inetd.conf
to run the wrapper script instead of the real
ftpd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 11:09 AM
тАО05-04-2009 11:09 AM
Re: ftpd and language and date. How to change?
The ftpd ist started by indetd, and has an entry in the inetd.conf.
If i do export LC_ALL="C" as root and then do ineetd -c to restart ftpd, will it work?
Will the date show as "May" when a user list the files. This is rather important though the ftp-client can not download the files when the date is shown in swedish.
Br
Patrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 12:39 PM
тАО05-04-2009 12:39 PM
Re: ftpd and language and date. How to change?
In this case, you'll really need a "/sbin/init.d/inetd stop; /sbin/init.d/inetd start".
If you just set the LC_ALL environment variable in your session before restarting inetd, it will work. But the next time when someone is restarting inetd for any reason, that environment variable must be set *again* or the problem will reoccur.
Putting the "export LC_ALL=C" line into the /sbin/init.d/inetd script will make sure this problem goes away and will not come back to bite you again.
As far as I know, the locale settings are the *only* thing on a typical Unix system that can affect the language used in the timestamps. The POSIX standard locale "C" *mandates* US English-style timestamps.
Very recently, there was a similar thread regarding the timezone settings for ftpd... ah, found it:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1336789
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 10:56 PM
тАО05-04-2009 10:56 PM
Re: ftpd and language and date. How to change?
I still do not understand.
I have two unix-boxes. The prod-box shows the date in Swedish when you do a ftp to it. Like "Maj" instead of "May".
And the test-box shows the date as "May" when i ftp to that box. And i can not find any difference in the locale or timezone settings on these boxes.
locale command shows the same on both boxes and the same user.
The working box:
$ locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=
TZ=MET-1METDST
Non working box:
$ locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=
TZ=MET-1METDST
Even the test-unix does not have the LC_ALL set. And this box is working.
Br
Patrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 11:18 PM
тАО05-04-2009 11:18 PM
Re: ftpd and language and date. How to change?
I did test to set the export LC_ALL="C".
And locale shows it as "C".
Then i restarted inetd: /sbin/init.d/inetd stop and then start. But when i login to the ftp server it still shows the same.
Br
Patrik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 11:39 PM
тАО05-04-2009 11:39 PM
Re: ftpd and language and date. How to change?
> and the same user.
The ftpd does not care what the locale is for
some random user. It cares what _its_ locale
is.
> May 4, 2009 16:44:20 GMT 2 pts
You may wish to think about that one again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 11:55 PM
тАО05-04-2009 11:55 PM
Re: ftpd and language and date. How to change?
How do i know what the difference is between these servers? One works and the other do not?
Writing a wrapper script is not an option, because i do not know how to do.
Br
Patrik