Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

how to make ftpd work?

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif

my board is based on 1c12, i have made a successful zImage according to the steps described in wikinios.jot.com. and i can telnet to my board from pc .

now i want to have a ftp server on my board:

what i have dones is fowllowing:

(1)

when "make menuconfig"

i select "ftpd" in "network application" and select "chroot" in "busybox" and select "adduser , addgroup , passwd" in " tinylogin"

(2)

then :

make clean

make romfs

make

create two empty files in romfs/etc: passwd group

make romfs

make linux image

(3)

then download the zImage to my board.

(4)

add a user in board using "adduser ftptest", but i get "adduser: Cannot determine your user name." messge

but it seems that a new user has been added because then content of the file etc/passwd becomes "ftptest:x:500:500::/home/ftptest:/bin/sh"

and the etc/group is: "ftptest:x:500:"

(5) then try to test ftp serve with the "ftptest" username

ftp 192.168.0.202 (192.168.0.202 is my board ip)

then i got the following message:

Connected to 192.168.0.202.

220 uClinux FTP server (GNU inetutils 1.4.1) ready.zj2

Name (192.168.0.202:none): ftptest

500 &#39;USER ftptest&#39;: command not understood.

Login failed.

ftp>

(6) there are no choices for me instead of "bye"

i have do some more efforts, such as change the ftpd.c , but i have the same result " command not understood"!!

if anyone can tell me what&#39;s the problem?

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i have tried to changed some code in user/ftpd/ directory, such as ftpd.c, auth.c,

    for example, i do nothing in auth_user() and auth_pass( ) functions in auth.c but just let " return 0 " as the first line of functions. ( of course it let auth_user, auth_pass to be successful!)

    but i got the same result: "command not understood"!

    i have given up my effort to cope with ftpd. i think my knowledge of linux programming is not enough to do this work!

    i have installed ftp server in my WINXP, so i can transfer programs from my notebook computer to my board and then run them.

    i still longs to have some tips to conquer the ftpd! thanks to it!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The problem may be in ftpcmd.c . The user command is not parsed correctly.

    But I didn&#39;t have much time to look into it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@Jun 10 2006, 08:30 AM

    the problem may be in ftpcmd.c . the user command is not parsed correctly.

    but i didn&#39;t have much time to look into it.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16083)

    --- quote end ---

    --- Quote End ---

    OK, I will try it. ftpcmd.c is much more difficult to read and understand.

    best regards!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by fbc99+jun 11 2006, 08:25 am--><div class='quotetop'>quote (fbc99 @ jun 11 2006, 08:25 am)</div>

    --- quote start ---

    <!--quotebegin-hippo@Jun 10 2006, 08:30 AM

    the problem may be in ftpcmd.c . the user command is not parsed correctly.

    but i didn&#39;t have much time to look into it.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16083)

    --- quote end ---

    --- Quote End ---

    OK, I will try it. ftpcmd.c is much more difficult to read and understand.

    best regards!!

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16087)</div>

    [/b]

    --- Quote End ---

    It is generated from ftpcmd.y .

    You may use ftpd in apps of mx140 as in the buildroot guide.