Showing results for 
Search instead for 
Did you mean: 
Honored Contributor I

ftp settings in uClinux

Thanks in advance. 


I have a compact flash on the Cyclone III development board and I'd like to be able to ftp files on my compact flash to a Windows machine. 


How do I allow access to the compact flash "/mnt" ? Currently I only have access to the "/home/ftp" directory. I've tried a symbolic link in the romfs/home/ftp directory ... and done a "make" to get a new zImage, but I am doing something incorrectly.
0 Kudos
6 Replies
Honored Contributor I



just to make sure, you want to copy files from your compact flash to a another pc? 


Then you will need to setup a ftp server (daemon) on the board. 

Did you already implemented the MTD Device and installed a Flash File System, i.e. JFFS2? 

If so you just need to mount the filesystem i.e. in /mnt/cf and then make a ftp connection on the board to your pc and then send your files from /mnt/cf/ to the directory on pc. 


Honored Contributor I



Yes, I have the compact flash mounted and I record to it (use ext3). The files are too big to copy to the "/home/ftp" directory and pull from there. 


To be clearer. I have no problems when I ftp to a Linux machine unfortunately the end user will have various Windows machines with their standard ftp (no ftp server). So, from the Windows command prompt window I can 




and log onto the NiosII uClinux using the user "ftp" and no password. 


and I can pull files from the "/home/ftp" AND send files to the "/home/ftp" directory. 


Is there a way to make the "/mnt/cf" directory accessable? 


Thanks in advance
Honored Contributor I

Hi jpe1313, 


did you successfully wrote something from the board to your /mnt directory? So to make sure the compact flash is mounted correctly. 

And what message do you get when trying to access /mnt with ftp? 


And did you follow this guide? 


Honored Contributor I



Yes, I've successfully used the Compact Flash on numerous projects. I don't do all that is on the wiki link you referenced because I use my compact flash as "ext3" formatted. 


I'm not at the evaluation board to give you the exact "ftp" messages but will do so later this afternoon PST. 


I think my question is pretty generic - the nios 2 uClinux ftp is set up to use "/home/ftp" how do I allow access to other directories? 


Thanks in advance
Honored Contributor I

Urmel (and anyone else), 


Here is the ftp session to my Cyclone III 1C20 Eval Board.  

NOTE: My IP address is 


[janet@localhost ~]$ ftp 

Connected to 

220- Welcome to the uClinux ftpd! 

220 uClinux FTP server (GNU inetutils 1.4.1) ready. 

500 'AUTH GSSAPI': command not understood. 

500 'AUTH KERBEROS_V4': command not understood. 

KERBEROS_V4 rejected as an authentication type 

Name ( ftp 

331 Guest login ok, type your name as password. 


230 Guest login ok, access restrictions apply. 

Remote system type is UNIX. 

Using binary mode to transfer files. 

ftp> cd /cf 

550 /cf: No such file or directory. 




I'd like to be able to get to the compact flash directory "/cf" and do a "get filename" 

Also an "ls" does not show any files when I put a couple of files there.
Honored Contributor I



O.K. For my problem I'm going to be performing the ftp from Windows to my uClinux nios. There is still ONE issue Linux to nios2 and that is an "ls" does not work. I did see a thread about this, but I didn't try it: The thread is titled "uClinux FTP Question?" 


in the nios2-linux/uclinux-dist/vendors/altera/nios2 directory i modified the "passwd" file to point to my directory, not the "/home/ftp" 



ftp:x:14:50:ftp user:/cf:# ###ftp:x:14:50:ftp user:/home/ftp: 


I have tested this from a Windows XP machine and it works. I can ftp, do an "ls" and see all the files, and "get" them.  


I will test Windows 7 tomorrow... If I don't post again then there were no problems. I may try a Vista machine too, but I think the ftp client is not on the Vista so we'd have to install that and it's not my computer. 


Hope this is useful to someone. I've done lots with the Compact Flash the nios and uClinux and it makes a reliable, inexpensive embedded data recorder.