AWS SSL and FTP Server File System Example

This example shows how to setup the FTP server with the file system. It allows user 
to access the file system via FTP client.

The example also allows you view any file that you placed into the file system via ssl as well.


This example should work on the Netsilicon NET+50 and NS7520 development boards.  
It will not work on the DigiConnect boards unless you configure the BSP to create 
the file system by setting the constant BSP_INCLUDE_FILESYSTEM_FOR_CLIBRARY in bsp.h 
and rebuilding your BSP.

This "naftpsvr_fs" example will set up 2 volumes ("FLASH0" and "RAM0") in RAM if BSP 
is not configured to initialize the volumes. Please see BSP. 

If BSP is configured to initialize the file system, make sure it creates two volumes 
with the name of "FLASH0" and "RAM0".

This application starts and creates:
1. A test file in \RAM0 (root directory) with group id 1.
2. "DIR0" directory in \RAM0 with group id 1.
3. "DIR1" directory in \RAM0 with group id 2.
4. "dir0" username & "dir0" password for accessing group id 1 files/directories.
5. "dir1" username & "dir1" password for accessing group id 2 files/directories.
6. "user" username & "password" password for accessing both group id 1 & 2.

"RAM0" is the default directory when a user logs in.

APP_USE_NETWORK_TIME_PROTOCOL is defined in appconf.h to include time for file and
directory creation.

Please make sure that you modify the dummystart.c file on line 18 to reflect the IP address of your target.

Once you load the image, please wait until you see the following spitted out from the terminal.

FTP Server File System Example Ready
Generating certificate.  This may take a few minutes.
AWS HTTPS Web Server Sample Application is ready.

Following this ftp to the board and put any html or any file that you wish to view
as you declared in dummy start.c file:

for example:

In Dummystart.c file I de fiend it as follows:
	"url=https://10.49.2.51/FS/RAM0/fun.gif">\n"
Then I ftp that file as presented below:
C:\NETOS60_GH361\src\apps\naftpsvr_AWSss_fs>ftp 10.49.2.51
Connected to 10.49.2.51.
220 NET+ARM FTP Server 1.0 ready.
User (10.49.2.51:(none)): user
331 User user OK, send password.
Password:
230 Password OK.
ftp> put fun.gif.txt
200 PORT command Ok.
150 About to open data connection.
226 Transfer complete
ftp: 32 bytes sent in 0.00Seconds 32000.00Kbytes/sec.
ftp> quit
221 Goodbye.

When I browse to the page: https://10.49.2.51
The java script fwds the apge to the page to the https://10.49.2.51/FS/RAM0/fun.gif\
as if it is the home page.

This is a handy example to make you feel comfortable with SSL and the file system 

