You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Hiroki Taniura (JIRA)" <ji...@apache.org> on 2016/07/07 07:22:11 UTC

[jira] [Comment Edited] (NET-597) FTP fails for Solaris 10 FTPd in Japanese

    [ https://issues.apache.org/jira/browse/NET-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365712#comment-15365712 ] 

Hiroki Taniura edited comment on NET-597 at 7/7/16 7:22 AM:
------------------------------------------------------------

Here is the patch to parse the Japanese timestamp.
After applying it, the sample client lists the files.
{panel}
220 unknown FTP server ready.
Connected to 192.168.2.160 on 21
USER *******
331 Password required for root.
PASS *******
230 User root logged in.
SYST
215 UNIX Type: L8 Version: SUNOS
Remote system is UNIX Type: L8 Version: SUNOS
TYPE A
200 Type set to A.
PASV
227 Entering Passive Mode (192,168,2,160,8,40)
LIST
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
-rw-------   1 root     root         848  2・? 25??  15:57 .ICEauthority
-rw-------    1 root     root          848 .ICEauthority
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .Trash
drwx------    3 root     root          512 .Trash
-rw-------   1 root     root         150  2・? 25??  15:57 .Xauthority
-rw-------    1 root     root          150 .Xauthority
drwxr-xr-x   9 root     root         512  2・? 25??  15:57 .dt
drwxr-xr-x    9 root     root          512 .dt
-rwxr-xr-x   1 root     root        5111  6・? 13?? 2014? ̄ .dtprofile
-rwxr-xr-x    1 root     root         5111 .dtprofile
-rw-------   1 root     root          16  6・? 13?? 2014? ̄ .esd_auth
-rw-------    1 root     root           16 .esd_auth
drwx------   4 root     root         512  2・? 25??  15:57 .gconf
drwx------    4 root     root          512 .gconf
drwx------   2 root     root         512  7・?  7??  15:53 .gconfd
drwx------    2 root     root          512 .gconfd
drwx------   4 root     root         512  6・? 13?? 2014? ̄ .gnome
drwx------    4 root     root          512 .gnome
drwx------   7 root     root         512  2・? 25??  15:57 .gnome2
drwx------    7 root     root          512 .gnome2
drwx------   2 root     root         512  6・? 13?? 2014? ̄ .gnome2_private
drwx------    2 root     root          512 .gnome2_private
drwxr-xr-x   2 root     root         512  6・? 13?? 2014? ̄ .gstreamer-0.8
drwxr-xr-x    2 root     root          512 .gstreamer-0.8
-rw-r--r--   1 root     root          77  6・? 13?? 2014? ̄ .gtkrc-1.2-gnome2
-rw-r--r--    1 root     root           77 .gtkrc-1.2-gnome2
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .iiim
drwx------    3 root     root          512 .iiim
drwxr-xr-x   3 root     root         512  6・? 13?? 2014? ̄ .java
drwxr-xr-x    3 root     root          512 .java
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .metacity
drwx------    3 root     root          512 .metacity
drwxr-xr-x   3 root     root         512  6・? 13?? 2014? ̄ .nautilus
drwxr-xr-x    3 root     root          512 .nautilus
-rw-------   1 root     root         865  7・?  7??  14:30 .recently-used
-rw-------    1 root     root          865 .recently-used
drwxr-xr-x   3 root     root         512  6・? 13?? 2014? ̄ .softwareupdate
drwxr-xr-x    3 root     root          512 .softwareupdate
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .thumbnails
drwx------    3 root     root          512 .thumbnails
drwxr-xr-x   4 root     root         512  2・? 25??  15:35 Desktop
drwxr-xr-x    4 root     root          512 Desktop
drwxr-xr-x   2 root     root         512  6・? 13?? 2014? ̄ Documents
drwxr-xr-x    2 root     root          512 Documents
lrwxrwxrwx   1 root     root           9  6・? 13?? 2014? ̄ bin -> ./usr/bin
lrwxrwxrwx    1 root     root            9 bin
drwxr-xr-x   8 root     sys          512  6・? 13?? 2014? ̄ boot
drwxr-xr-x    8 root     sys           512 boot
drwxr-xr-x   3 root     nobody       512  6・? 13?? 2014? ̄ cdrom
drwxr-xr-x    3 root     nobody        512 cdrom
drwxr-xr-x  19 root     sys         4608  2・? 25??  15:11 dev
drwxr-xr-x   19 root     sys          4608 dev
drwxr-xr-x   2 root     sys          512  2・? 25??  15:10 devices
drwxr-xr-x    2 root     sys           512 devices
drwxr-xr-x  90 root     sys         4608  2・? 25??  15:11 etc
drwxr-xr-x   90 root     sys          4608 etc
drwxr-xr-x   3 root     sys          512  6・? 13?? 2014? ̄ export
drwxr-xr-x    3 root     sys           512 export
dr-xr-xr-x   1 root     root           1  2・? 25??  15:11 home
dr-xr-xr-x    1 root     root            1 home
drwxr-xr-x   3 root     root         512  6・? 14?? 2014? ̄ home1
drwxr-xr-x    3 root     root          512 home1
drwxr-xr-x  20 root     sys          512  6・? 13?? 2014? ̄ kernel
drwxr-xr-x   20 root     sys           512 kernel
drwxr-xr-x   8 root     bin         5632  6・? 13?? 2014? ̄ lib
drwxr-xr-x    8 root     bin          5632 lib
drwx------   2 root     root        8192  6・? 13?? 2014? ̄ lost+found
drwx------    2 root     root         8192 lost+found
drwxr-xr-x   2 root     sys          512  6・? 13?? 2014? ̄ mnt
drwxr-xr-x    2 root     sys           512 mnt
dr-xr-xr-x   1 root     root           1  2・? 25??  15:11 net
dr-xr-xr-x    1 root     root            1 net
drwxr-xr-x   5 root     sys          512  6・? 13?? 2014? ̄ opt
drwxr-xr-x    5 root     sys           512 opt
drwxr-xr-x   5 root     sys          512  6・? 13?? 2014? ̄ platform
drwxr-xr-x    5 root     sys           512 platform
dr-xr-xr-x  89 root     root      457152  7・?  7??  16:04 proc
dr-xr-xr-x   89 root     root       457152 proc
drwxr-xr-x   2 root     sys         1024  6・? 13?? 2014? ̄ sbin
drwxr-xr-x    2 root     sys          1024 sbin
drwxr-xr-x   4 root     root         512  6・? 13?? 2014? ̄ system
drwxr-xr-x    4 root     root          512 system
drwxrwxrwt  10 root     sys          875  7・?  7??  15:08 tmp
drwxrwxrwx   10 root     sys           875 tmp
drwxr-xr-x  40 root     sys         1024  6・? 13?? 2014? ̄ usr
drwxr-xr-x   40 root     sys          1024 usr
drwxr-xr-x  47 root     sys         1024  6・? 13?? 2014? ̄ var
drwxr-xr-x   47 root     sys          1024 var
dr-xr-xr-x   6 root     root         512  2・? 25??  15:11 vol
dr-xr-xr-x    6 root     root          512 vol
NOOP
200 NOOP command successful.
QUIT
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 3423 bytes in 1 transfers.
221-Thank you for using the FTP service on unknown.
221 Goodbye.
{panel}

The timestamp listed is broken, but it is much better than not listing files at all.


was (Author: htaniura):
Here is the patch to Parse the Japanese timestamp.
After applying it, the sample client lists the files.
{panel}
220 unknown FTP server ready.
Connected to 192.168.2.160 on 21
USER *******
331 Password required for root.
PASS *******
230 User root logged in.
SYST
215 UNIX Type: L8 Version: SUNOS
Remote system is UNIX Type: L8 Version: SUNOS
TYPE A
200 Type set to A.
PASV
227 Entering Passive Mode (192,168,2,160,8,40)
LIST
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
-rw-------   1 root     root         848  2・? 25??  15:57 .ICEauthority
-rw-------    1 root     root          848 .ICEauthority
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .Trash
drwx------    3 root     root          512 .Trash
-rw-------   1 root     root         150  2・? 25??  15:57 .Xauthority
-rw-------    1 root     root          150 .Xauthority
drwxr-xr-x   9 root     root         512  2・? 25??  15:57 .dt
drwxr-xr-x    9 root     root          512 .dt
-rwxr-xr-x   1 root     root        5111  6・? 13?? 2014? ̄ .dtprofile
-rwxr-xr-x    1 root     root         5111 .dtprofile
-rw-------   1 root     root          16  6・? 13?? 2014? ̄ .esd_auth
-rw-------    1 root     root           16 .esd_auth
drwx------   4 root     root         512  2・? 25??  15:57 .gconf
drwx------    4 root     root          512 .gconf
drwx------   2 root     root         512  7・?  7??  15:53 .gconfd
drwx------    2 root     root          512 .gconfd
drwx------   4 root     root         512  6・? 13?? 2014? ̄ .gnome
drwx------    4 root     root          512 .gnome
drwx------   7 root     root         512  2・? 25??  15:57 .gnome2
drwx------    7 root     root          512 .gnome2
drwx------   2 root     root         512  6・? 13?? 2014? ̄ .gnome2_private
drwx------    2 root     root          512 .gnome2_private
drwxr-xr-x   2 root     root         512  6・? 13?? 2014? ̄ .gstreamer-0.8
drwxr-xr-x    2 root     root          512 .gstreamer-0.8
-rw-r--r--   1 root     root          77  6・? 13?? 2014? ̄ .gtkrc-1.2-gnome2
-rw-r--r--    1 root     root           77 .gtkrc-1.2-gnome2
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .iiim
drwx------    3 root     root          512 .iiim
drwxr-xr-x   3 root     root         512  6・? 13?? 2014? ̄ .java
drwxr-xr-x    3 root     root          512 .java
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .metacity
drwx------    3 root     root          512 .metacity
drwxr-xr-x   3 root     root         512  6・? 13?? 2014? ̄ .nautilus
drwxr-xr-x    3 root     root          512 .nautilus
-rw-------   1 root     root         865  7・?  7??  14:30 .recently-used
-rw-------    1 root     root          865 .recently-used
drwxr-xr-x   3 root     root         512  6・? 13?? 2014? ̄ .softwareupdate
drwxr-xr-x    3 root     root          512 .softwareupdate
drwx------   3 root     root         512  6・? 13?? 2014? ̄ .thumbnails
drwx------    3 root     root          512 .thumbnails
drwxr-xr-x   4 root     root         512  2・? 25??  15:35 Desktop
drwxr-xr-x    4 root     root          512 Desktop
drwxr-xr-x   2 root     root         512  6・? 13?? 2014? ̄ Documents
drwxr-xr-x    2 root     root          512 Documents
lrwxrwxrwx   1 root     root           9  6・? 13?? 2014? ̄ bin -> ./usr/bin
lrwxrwxrwx    1 root     root            9 bin
drwxr-xr-x   8 root     sys          512  6・? 13?? 2014? ̄ boot
drwxr-xr-x    8 root     sys           512 boot
drwxr-xr-x   3 root     nobody       512  6・? 13?? 2014? ̄ cdrom
drwxr-xr-x    3 root     nobody        512 cdrom
drwxr-xr-x  19 root     sys         4608  2・? 25??  15:11 dev
drwxr-xr-x   19 root     sys          4608 dev
drwxr-xr-x   2 root     sys          512  2・? 25??  15:10 devices
drwxr-xr-x    2 root     sys           512 devices
drwxr-xr-x  90 root     sys         4608  2・? 25??  15:11 etc
drwxr-xr-x   90 root     sys          4608 etc
drwxr-xr-x   3 root     sys          512  6・? 13?? 2014? ̄ export
drwxr-xr-x    3 root     sys           512 export
dr-xr-xr-x   1 root     root           1  2・? 25??  15:11 home
dr-xr-xr-x    1 root     root            1 home
drwxr-xr-x   3 root     root         512  6・? 14?? 2014? ̄ home1
drwxr-xr-x    3 root     root          512 home1
drwxr-xr-x  20 root     sys          512  6・? 13?? 2014? ̄ kernel
drwxr-xr-x   20 root     sys           512 kernel
drwxr-xr-x   8 root     bin         5632  6・? 13?? 2014? ̄ lib
drwxr-xr-x    8 root     bin          5632 lib
drwx------   2 root     root        8192  6・? 13?? 2014? ̄ lost+found
drwx------    2 root     root         8192 lost+found
drwxr-xr-x   2 root     sys          512  6・? 13?? 2014? ̄ mnt
drwxr-xr-x    2 root     sys           512 mnt
dr-xr-xr-x   1 root     root           1  2・? 25??  15:11 net
dr-xr-xr-x    1 root     root            1 net
drwxr-xr-x   5 root     sys          512  6・? 13?? 2014? ̄ opt
drwxr-xr-x    5 root     sys           512 opt
drwxr-xr-x   5 root     sys          512  6・? 13?? 2014? ̄ platform
drwxr-xr-x    5 root     sys           512 platform
dr-xr-xr-x  89 root     root      457152  7・?  7??  16:04 proc
dr-xr-xr-x   89 root     root       457152 proc
drwxr-xr-x   2 root     sys         1024  6・? 13?? 2014? ̄ sbin
drwxr-xr-x    2 root     sys          1024 sbin
drwxr-xr-x   4 root     root         512  6・? 13?? 2014? ̄ system
drwxr-xr-x    4 root     root          512 system
drwxrwxrwt  10 root     sys          875  7・?  7??  15:08 tmp
drwxrwxrwx   10 root     sys           875 tmp
drwxr-xr-x  40 root     sys         1024  6・? 13?? 2014? ̄ usr
drwxr-xr-x   40 root     sys          1024 usr
drwxr-xr-x  47 root     sys         1024  6・? 13?? 2014? ̄ var
drwxr-xr-x   47 root     sys          1024 var
dr-xr-xr-x   6 root     root         512  2・? 25??  15:11 vol
dr-xr-xr-x    6 root     root          512 vol
NOOP
200 NOOP command successful.
QUIT
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 3423 bytes in 1 transfers.
221-Thank you for using the FTP service on unknown.
221 Goodbye.
{panel}

The timestamp listed is broken, but it is much better than not listing files at all.

> FTP fails for Solaris 10 FTPd in Japanese
> -----------------------------------------
>
>                 Key: NET-597
>                 URL: https://issues.apache.org/jira/browse/NET-597
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.4, 3.5
>         Environment: Server: Solaris 10 Japanese
> Client: Windows 7
>            Reporter: Hiroki Taniura
>            Priority: Minor
>         Attachments: ParseJapanese.patch
>
>
> Commons Net lists no files for Solaris 10 FTPd (or WU-FTPD) when the server language is Japanese.
> Here is the result of the sample client.
> {panel}
> java -jar commons-net-examples-3.5.jar FTPClientExample -l 192.168.2.160 root password
> 220 unknown FTP server ready.
> Connected to 192.168.2.160 on 21
> USER *******
> 331 Password required for root.
> PASS *******
> 230 User root logged in.
> SYST
> 215 UNIX Type: L8 Version: SUNOS
> Remote system is UNIX Type: L8 Version: SUNOS
> TYPE A
> 200 Type set to A.
> PASV
> 227 Entering Passive Mode (192,168,2,160,235,174)
> LIST
> 150 Opening ASCII mode data connection for /bin/ls.
> 226 Transfer complete.
> NOOP
> 200 NOOP command successful.
> QUIT
> 221-You have transferred 0 bytes in 0 files.
> 221-Total traffic for this session was 3426 bytes in 1 transfers.
> 221-Thank you for using the FTP service on unknown.
> 221 Goodbye.
> {panel}
> I identified the cause in the source code. I'm attaching a patch later.
> On Japanese Solaris 10, the result of "ls -l" is like below;
> {panel}
> drwxrwxrwt  10 root     sys          875  7月  7日  14:18 tmp
> drwxr-xr-x  40 root     sys         1024  6月 13日 2014年 usr
> drwxr-xr-x  47 root     sys         1024  6月 13日 2014年 var
> dr-xr-xr-x   6 root     root         512  2月 25日  15:11 vol
> {panel}
> As you can see, the timestamp has the postfixes of "month", "date", and "year" in Japanese.
> The current REGEX of UnixFTPEntryParser doesn't work for it because of the Japanese postfixes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)