Computers, Development Boards & Shields
Educational & Robotics Kits
Electronic Sensors
Motors & Controllers
Communication & Display
Electronic Components
Soldering & Lab Tools

How to install FTPD on the PcDuino 3 (LAMP P3)

Okay so having FTPD on the PcDuino 3 is not really  technically part of a LAMP server, so with this addition I guess you could call yours a FLAMP server. That said FTP is a great addition to the PcDuino 3, and it can really save you a lot of hassle by eliminating the need to use a screen on your server, and allowing you to edit files remotely. This guide is designed to help you install FTPD on your PcDuino 3 and is a follow up to the PcDuino PHP Installation Guide, and part three of the PcDuino 3 LAMP Server installation guide. If you are reading this then you probably have a PcDuino 3 that you need to install a LAMP (Linux Apache MySQL PHP) server on. Again if you haven’t install Apache, or PHP yet please follow the guide linked above, and later in this guide we recommend installing them first. That said, you can technically run FTPD on your board without running a web server of any kind just to make it easier to access your files, and make changed to the PcDuino remotely.

The Pcduino 3 requires 5V DC power through use of a USB micro, an HDMI cable to be connected to a television or monitor that allows HDMI input, a standard keyboard, and a mouse (technically not required, but it sure makes it easier to open things up). To ensure that the keyboard and mouse can be used together it is wise to use a powered USB hub throughout set-up since some Mouse/Keyboard combos may exceed your supply if you don’t have the recommended 2A supply connected.

Installing the PHP on the PcDuino 3:

Once the PCDuino3 has completed boot up a desktop several preset icons will be present on the

screen.  One of these icons will be labeled LXTerminal. Opening this icon allows for you to enter the terminal commands throughout this guide.

Linux – Should be installed by default.

NOTE: the “sudo apt-get update” command can take several hours to update all

repositories depending on how out of date yours are. Most users can proceed without

the update, but if unexpected problems come up this can often be the cause.

Apache – Should have been installed before proceeding: PcDuino Apache Installation Guide

PHP – Should have been installed before procedding: PcDuino PHP Installation Guide

FTPD – At this point you should ensure that there is no issue with privileges the by granting the appropriate privileges to the web folder. Type “nano /etc/sudoers” and then add the line “USER ALL=(ALL:ALL) ALL” to allow the user root privileges. This will be particularly important for the installation of our FTP server which is why we are re-iterating it here.

A change mod will also need to be performed to allow directory access for files to be created, and edited on the web server.

To do this run the command “sudo chmod 777 –R /var/www/html“.

To allow file transfer the “Very Secure FTP Daemon” is installed by typing “sudo apt-get install vsftpd” into the terminal. Once installed the configuration will need to be adjusted.

To open the configuration file type “sudo nano /etc/vsftpd.conf” (once again you can substitute your favorite installed text editor).

Once opened scroll down to anonymous_enable=YES and comment it out by typing # in front of the line

(aka #anonymous_enable=YES).

Then scroll down and ensure that local_enable and write_enable are uncommented (by deleting any # infront of their lines) and are set equal to YES.

Continue to scroll down and uncomment chroot_list_enable=YES and chroot_list_file/etc/vsftpd.chroot_list.

After making these changes press Ctrl+x (in nano). When asked if you would like to save these changes press y and then enter. Once back in the terminal type “sudo touch /etc/vsftpd.chroot_list” to create the file. Once created type “sudo nano /etc/vsftpd.chroot_list” and press enter. Type the user to obtain access which in this case is root (but it could be a different user). To exit press Ctrl+x, type y to save and enter to return to the terminal.

Finally either restart the machine, or try typing the following command “sudo service vsftpd restart” which should restart your FTP server and load your new settings. Now try to connect to your PcDuino 3 with your favorite FTP client (mine is Filezilla) with the username root, and your password (PcDuino 3 default password is “ubuntu“).

Now if you browse to /var/www/ you should be able to edit and add any files to your webserver. If you have any problems with files make sure you did a proper sudo chmod as shown at the beginning of this guide.

Now we are getting really close, only two more steps before we have a pretty much fully featured webserver running on our little embedded linux PcDuino 3 board. In the next guide we will  go over how to install MySQL & PhpMyAdmin on the PcDuino 3.

No comments yet.

Leave a Reply