====== Installing an FTP server ====== ===== Installation ===== FTP (File Transfer Protocol) is a communication protocol designed to exchanged files on the TCP/IP network. Using a computer, it enables you to copy files to another network computer. Let's see how you can set up an FTP service on a Gandi virtual machine. The first step is to install ProFTP on the server apt-get install proftpd {{ fr:hosting:using-linux:tutorials:ubuntu:fr:photo1ftp.gif }} {{ http://img137.imageshack.us/img137/3286/proftpdecran1kh3.png }} It is preferable to continue the installation in standalone, this way the FTP server will always be receptive. If you choose inetd, the FTP server will only be launched when a connexion is initialized. ===== Parameters ===== Using a text editor such as nano, edit the file called **shells** in the **/etc/** directory and a line: "/bin/false/", as shown below: {{ fr:hosting:using-linux:tutorials:ubuntu:fr:photo2ftp.gif }} Nano enables you to edit your text documents (like a more intuitive vi). You can install it by using the **apt-get install nano** command. For our example, let's create ftp folders and the **upload** and **download** sub domains, with 'read only' rights on **download** and 'read/write' for **upload**, so that users can upload files. cd /home/ftp/ mkdir download upload cd /home sudo chmod 755 ftp cd ftp chmod 755 download chmod 777 upload Now that the folders and rights are sorted, let's create a "gandi" account which will have access to the FTP useradd gandi -p votre_mot_de_passe -d /home/ftp -s /bin/false passwd gandi Now all that's left is to edit the **/etc/proftpd/proftpd.conf** file with nano to modify your server configuration (port address, server name, number of people who can connect...) Launch the server using the following command: sudo /etc/init.d/proftpd start To stop it, replace **start** by **stop**, and use **restart** to... restart! ----