Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
1,200 Views

Anyone have a working FTP?

If anyone has a working ftp server (ftpd) on their uClinux box please, tell me how you got it to work. By working I mean that you can upload to it and see the directory structure and dowload from it. 

 

Thank you. I'm getting desperate and nothing seems to work, but the defult instalation that came with the board, so I know its possible! 

 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif
0 Kudos
8 Replies
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

I can&#39;t remember the exact details of the problem that you&#39;re having, can you list off what you&#39;ve done and what problems you&#39;re seeing?

0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

Thank you for the response Ken. 

My problem is that on a default installation of uClinux 1.4 with a Microtronix Open Cores MAC, the FTP server (ftpd) does not allow me to "see" the directory structure or download from it. (It does allow me to upload files to the /home/ftp directory, which is mapped to a ramdisk) 

 

If I do a ./restore_my_flash thing (factory kernel, filesystem and EPC12 layout) the FTP server works correctly, allows me to log in with user=nios pass=uClinux and allows me to navigate anywhere and upload and download files. 

 

I&#39;m wondering what settings I need to get the FTP server working properly?? (allowing me to see files, and download, not just upload files) (I have tried to copy the rc file and passwd and group files, does not seem to help) 

 

Is the included FTP server crippled in some way?
0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

rc file sniplet 

# Make a big Ramdisk! 

/bin/mke2fs -q -m0 /dev/ram3 

/bin/mount -t ext2 /dev/ram3 /home/ftp -n 

/bin/chmod 777 /home/ftp 

# mount proc file system 

/bin/mount -t proc proc /proc -n 

# mount sysfs 

/bin/mount -t sysfs sysfs /sys -n 

# manually assign ip address (uncomment and edit as appropriate)# note: first ifattach (no args) sets local loopback 

/bin/ifattach 

/bin/ifattach --addr 192.168.1.2 --mask 255.255.255.0 --net 192.168.1.0 --gw 192.168.1.11 --if eth0 

# start up the internet superserver 

/bin/inetd & 

# start up the web server 

/bin/boa & 

 

******************************************************************* 

 

inetd.conf sniplet 

 

ftp stream tcp nowait root /bin/ftpd 

telnet stream tcp nowait root /bin/telnetd 

uptime stream tcp nowait root cat /proc/uptime /etc/issue 

 

****************************************************************** 

 

services sniplet 

# Here is a simple services file.#  

ftp-data 20/tcp 

ftp 21/tcp 

telnet 23/tcp 

uptime 24/tcp 

http 80/tcp 

 

******************************************************************
0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

Everything you sent me looks alright... 

 

I&#39;m not sure which FTP client you use, but could you try sending me a log file containing all the commands and status messages that go back and forth between your client and ftpd as you log in? 

 

It&#39;ll help me track down the problem.
0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

Woo Hoo!  

I found the problem. I dont know why this is but here is the solution. 

 

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! 

Anyone know why the ls.exe does not work?
0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

I&#39;ve never heard any reports of it not working... I use it all the time still... does it work from the commandline?

0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

Yes. typing "ls" at the command prompt with the default installation (1.4) of uClinux does work. (meaning using the ls.exe) 

 

The default ls.exe doe not return text in color, or seem to report the directory structure to the ftp server. (not sure how that whole interaction works) 

 

However; the ls in the busybox works also at the command prompt, returns with colored text, and also corectly returns the directory structure to the ftp server. 

 

I have no Idea why this does this, it was blind luck that I discoverd it. 

 

So yours works? Weird. I am using SmartFTP in passive mode. (also useing FTP lib in a custom python program that did not work untill I used the ls from busybox)
0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: Anyone have a working FTP?

I have found that the ftpd does not work correctly in passive mode for ls. You may want to go back and try the ls.exe and switch your ftp client out of passive mode.

0 Kudos