Forum Discussion

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

uClinux FTP Question?

Hello I have a program that creates files, puts them into my //home/ftp directory. I would like to log into the FTP server and download those files that the program creates. I cant dowload or see anyfiles there, but I can upload files to that location.

How do I set up the permisions so I can see and download those through the FTP server?

7 Replies

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

    I copied ls into my /home/ftp directory. However; it does not seem to do anything differntly. I suppose that was so that the ftp client could get a directory listing, but it still doesnt do that. Furthermore I still cannot actually download any files from that location even if I already "know" they exist there.

    Any other sugestions?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    BTW: the Default installation of my "Altera EPC12_eval" kit works just fine. I dont see how its so differnt. The rc file and other files in the /etc directory are nearly identical!?!

    the default installation ./restore_my_flash thing does not have ls in the ftp directory. What are the differences in the /ftp setup?

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

    You were on the right track it had to do with the ls, but putting ls in the ftp directory did nothing here is what I did.

    I found that the default instalation worked. The default installation used the "ls" command from the busybox. I created a little script:

    # !/bin/sh

    /bin/busybox ls $*

    that links the ls command back to the busybox, and I removed the ls.exe fromt the /bin directory.

    This gave me the colored text back, and allowed my ftp client to "see" the files! (same as the default instalation)

    Works prefectly now.

    Thanks for the help!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    You were on the right track it had to do with the ls, but putting ls in the ftp directory did nothing here is what I did.[/b]

    --- Quote End ---

    Sorry, I cannot understand the meaning of this sentence. My English is not good.

    I enumerate some common questions about ftpd on uclinux . it maybe can help you .

    first, you must change the terget dir of ftpd.

    like the example which i give you.

    open the /etc/passwd file .

    and fix the ftp user &#39;s root dir.

    ===passwd=================================================

    .......

    ftp:x:14:50:FTP User:/mnt/cf(<= /mnt is ramfs ):

    .......

    =========================================================

    that&#39;s because the uclinux use romfs in the /home dir.

    it no use to set the ftp dir to /home/ftp.

    Second, you make sure that your ftp client software is run in port mode.

    if run in pasive mode you will found the info from your ftp client software like this :

    ======================================================

    - ............

    - PASV

    - 227 Entering Passive Mode (0,0,0,0,12,1)

    - Opening data connection IP: 0.0.0.0 PORT: 3073

    - Unable connect to 0.0.0.0:3073 (Can&#39;t Assign Requested Address(10049))

    - ............

    ======================================================

    there are four ZEROs when the server send his IP.

    So, must use port mode without fix code of ftpd.

    Good luck with you.