Blog.gowifi

Blog.gowifi

logos (other)

Logos

Go Wireless NZ

Thursday, March 20, 2014

Configure an FTP Server to AirVision-C NVR Appliance


Scenario:
Installing an FTP server on a Ubiquiti airVision-C NVR Appliance may be useful for downloading recordings to an external server for offsite backup. This is a much faster option of downloading recordings for your airVision-C NVR than our previous guide which uses ssh (winscp). Average speed using FTP on a local network tested with a single 3GB file was around 35MiB/s.



Step 1:
Login to your NVR via ssh using PuTTY or other ssh application:
If prompted with a Security Alert about the host key please select Yes.
Username: root
Password: (your airvision/nvr login password)
 
Step 2:
Update all package sources:
apt-get update
Step 3:
Install proftpd FTP server:
apt-get install proftpd
Press "y" to accept and install if prompted.
Select "standalone" (i have not had much luck running from inetd).
 

Step 4:
Add this line /bin/false to the /etc/shells file for added security prevent shell access to user:
echo '/bin/false' >> /etc/shells

Step 5:
Create an FTP user and set their home directory to the airVision videos folder:
New User: ftpuser
New Password for 'ftpuser': ftppass
Set user home directory to airvision videos directory: /srv/airvision2/videos

useradd ftpuser -p ftppass -d /srv/airvision2/videos -s /bin/false

Step 6:
Set the Password for the new FTP user created above (i.e. ftppass):
passwd ftpuser

Step 7:
Editing the proftpd.conf configuration file:
I prefer using 'nano' text editor for editing files in linux (default installed is 'vi') to install nano use 'apt-get install nano'.
nano /etc/proftpd/proftpd.conf
Make the following changes to lock the user 'ftpuser' to their home directory (/srv/airvision2/videos).
Change the following line from:
#DefaultRoot                    ~
DefaultRoot                     /srv/airvision2/videos

Step 8:
Restart proftpd service to apply changes:
service proftpd restart

Step 9:
Connect via an FTP Client and start downloading:

2 comments:

  1. I have a error and the FTP wont work:

    root@NVR:~# service proftpd restart
    [ ok ] Stopping ftp server: proftpd.
    [....] Starting ftp server: proftpdNVR proftpd[16864]: mod_tls_memcache/0.1: notice: unable to register 'memcache' SSL session cache: Memcache support not enabled
    . ok

    ReplyDelete
    Replies
    1. Hi There, Have you tried enabling Memcache? Please see here for more information: http://www.proftpd.org/docs/howto/Memcache.html

      Delete