You don't need to run ftp in the jail. Your server already has ftp.
Setup your dataset for your cameras.
Configure FTP for that dataset.
Add that dataset as storage to your jail.
In the jail configure whatever web server config you need. I prefer nginx, but most tutorials assume Apache for the webserver.
If your application that you need to use runs on PHP, you will need to set that up. What application are you trying to run?
Thank you soo much for this, I've never realised how I should set this up without your advice :D
Ok, I've managed to do this sofar:
1. Set up a jail
2. Get nginx and php (with gd library) working in the jail :) (running a simple php gallery for the ip cams' images)
3. Set up storage as follows:
192.168.0.101 (Freenas) myarray/ftp/ -> 192.168.0.6 (Jail) /usr/local/www/nginx
I've understood that the "storage" works like mount? I mean everything I throw in the first folder (files/create subfolders etc.) ends up in the latter (jail)?
Sorry to ask these dumb questions here. But at least I'm eager to learn new things.
Some notes about the storage:
It seems to work ok, files in the first directory are available via browser "from" the jail. However, yesterday I managed to do something wicked... Somehow the contents of the storage above got "reverted" to an earlier state, meaning that the contents was replaced with something that I had there a week ago, but already deleted :O
This has something t do with zfs, am I correct? Any clues what I might have done? I've used Freenas via the Web interface and also via ssh as root. That's got something to do with it?
I really want to be sure, that I don't do the same mistakes again.
Thanks for your patience with me!