Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

uClinux FTP Question?

Altera_Forum
Honored Contributor II
1,599 Views

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?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
346 Views

copy '/bin/ls' to your ftp folder .

0 Kudos
Altera_Forum
Honored Contributor II
346 Views

I'll give it a go! Thanks

0 Kudos
Altera_Forum
Honored Contributor II
346 Views

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?
0 Kudos
Altera_Forum
Honored Contributor II
346 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
346 Views

Sorry , I said is not clear .  

My English is not good, please forgives . 

 

please see http://www.niosforum.com/forum/index.php?a...st=0&#entry8646 (http://www.niosforum.com/forum/index.php?act=st&f=18&t=2192&st=0&#entry8646) 

 

this is my topic "a problem when using ftpd in passive mode ", which you send a reply for me . 

 

I made an example for you .
0 Kudos
Altera_Forum
Honored Contributor II
346 Views

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!
0 Kudos
Altera_Forum
Honored Contributor II
346 Views

<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.
0 Kudos
Reply