Difference between revisions of "FTP Transfer Guide"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
(Created page with "<span data-link_translate_fr_title="Guide du transfert par FTP" data-link_translate_fr_url="Guide du transfert par FTP"></span>fr:Guide du transfert par FTPfr:Guide du...")
 
Line 5: Line 5:
  
 
{{#seo:
 
{{#seo:
|title=Guide du transfert par FTP
+
|title=FTP Transfer Guide
 
|titlemode=replace
 
|titlemode=replace
|keywords=ftp,serveur ftp, transfert ftp
+
|keywords=ftp,serveur ftp, FTP
|description=Le protocole de transfert de fichiers (File Transfer Protocol) est une solution facile et pratique pour effectuer ses envois de fichiers d'un poste local vers un hébergement.
+
|description=The File Transfer Protocol (FTP) is an easy and convenient way to send files from a local station to an accommodation.
 
|og:type=article
 
|og:type=article
|og:image=https://fr-wiki.ikoula.com/resources/assets/logo_ikwiki.png
+
|og:image=https://en-wiki.ikoula.com/resources/assets/logo_ikwiki.png
 
}}
 
}}
  
Le protocole de transfert de fichiers (File Transfer Protocol) est une solution facile et pratique pour effectuer ses envois de fichiers d'un poste local vers un hébergement, ou la récupération de fichiers stockés à distance afin de travailler dessus. Nous verrons dans ce guide la configuration d'un compte FTP sur les hébergements mutualisés Ikoula, la connexion au travers de plusieurs clients lourds (FileZilla et WinSCP) ; dans une seconde partie, nous nous intéresserons à la mise en place d'un serveur FTP sur un serveur dédié Linux.
+
File Transfer Protocol (FTP) is an easy and convenient way to send files from a local station to an accommodation,
 +
or recovering files stored remotely in order to work on them. We will see in this guide the configuration of an FTP account on shared hosting Ikoula,
 +
connection through several heavy clients (FileZilla and WinSCP); in a second part, we will focus on setting up an FTP server on a Linux dedicated server.
  
= Hébergements mutualisés =
+
= Web Hosting =
  
Les packs d'hébergement Ikoula (gammes IK et IKL) proposent systématiquement la possibilité de créer des comptes FTP permettant le transfert de fichiers.
+
The Ikoula hosting packages (IK and IKL ranges) systematically offer the possibility of creating FTP accounts allowing the transfer of files.
Ces accès sont faciles à configurer et n'ont pas de limite de temps.
+
These accesses are easy to configure and have no time limit.
  
== Création et configuration du compte ==
+
== Account creation and configuration ==
La configuration s'effectue en deux étapes :  
+
The configuration is done in two steps :  
  
* Se connecter au panneau de contrôle Ikoula
+
* Connect to the Ikoula control panel
* Configurer l'accès FTP
+
* Configure FTP access
  
La connexion au panneau de contrôle Ikoula se fait grâce à l'adresse email et au mot de passe définis lors de la création de votre compte Ikoula ; en cas de mot de passe oublié, la fonction éponyme est disponible sur la page de connexion.
+
The connection to the Ikoula control panel is done through the email address and password defined when creating your account Ikoula; in case of forgotten password, the eponymous function is available on the login page.
Pour information, les identifiants vous ont été envoyés à l'adresse email d'inscription dans un mail de bienvenue.
+
For information, the identifiers have been sent to the registration email address in a welcome email.
  
L'adresse du panneau de contrôle est la suivante (à garder en favoris) : <span style="border: 1px red solid; padding: 3px 10px 3px 10px;">https://order.ikoula.com/cp</span>
+
The address of the control panel is the following (to keep in favorites) : <span style="border: 1px red solid; padding: 3px 10px 3px 10px;">https://order.ikoula.com/cp</span>
  
Une fois connecté, choisissez le pack d'hébergement concerné dans la liste déroulant en haut à droite de l'écran :  
+
Once connected, choose the hosting package in the drop-down list at the top right of the screen :  
  
  
[[File:Ftp-doc-1.png]]
+
[[File:Ftp-doc-1.png|center|Choose the hosting package]]
  
  
Puis dans la sous-partie qui apparaît suite à la sélection, choisissez "Accès FTP" :
+
Then in the subpart that appears after the selection, choose "Acces FTP" :
  
  
[[File:Ftp-doc-2.png]]
+
[[File:Ftp-doc-2.png|center|Choose acces FTP]]
  
  
Dans la nouvelle page qui apparaît, vous devriez à minima constater la présence d'un utilisateur au nom d'aléatoire - il s'agit de l'utilisateur par défaut.
+
Dans la nouvelle page qui apparaît, vous devriez à minima constater la présence d'un utilisateur au nom d'aléatoire - It is the default user.
Attention : dans certains packs IK/IKL, seul un compte FTP est disponible. Nous vous invitons à vérifier les spécifications de chaques packs sur la page suivante : <span style="border: 1px red solid; padding: 3px 10px 3px 10px;">https://express.ikoula.com/fr/hebergement-web</span>
+
Warning : in some IK / IKL packages, only an FTP account is available. We invite you to check the specifications of each pack on the next page: <span style="border: 1px red solid; padding: 3px 10px 3px 10px;">https://www.ikoula.com/en/web-hosting</span>
  
Dans le cas où vous pouvez rajouter un nouveau compte, trois paramètres sont à déterminer :  
+
In case you can add a new account, three parameters are to be determined :  
  
  
[[File:Ftp-doc-3.png]]
+
[[File:Ftp-doc-3.png|center|Add new account]]
  
* Où nom du compte sera l'identifiant de connexion au compte par FTP
+
* Where account name will be the FTP account login
* "Répertoire principal" sera le chemin dans lequel atterrira l'utilisateur lors de la connexion.
+
* Where "Main Directory" will be the path in which the user will land when connecting.
* "Mot de passe" et "Confirmer le mot de passe" sera le mot de passe associé au compte.
+
* Where "Password" and "Confirm Password" will be the password associated with the account.
  
Une fois validé, le compte FTP est immédiatement crée et nous pouvons désormais passer à la connexion.
+
Once validated, the FTP account is immediately created and we can now switch to the connection.
  
== Connexion à l'utilisateur ==
+
== User Login ==
  
===  Par FileZilla ===
+
===  By FileZilla ===
  
FileZilla est l'un des logiciels les plus connus ; il supporte différents protocoles dont le FTP et le FTP sécurisé (FTPS).
+
FileZilla is one of the popular software ; he supports many protocol including FTP and secure FTP (FTPS).
Nous verrons dans cette documentation des informations relatives à la configuration de FileZilla vous permettant ainsi de vous connecter pour envoyer vos fichiers sur votre hébergement.
+
We will see in this documentation information about the configuration of FileZilla allowing you to connect to send your files on your hosting.
A noter qu'un utilisateur doit être crée et configuré, comme indiqué dans la partie précédente de cette page.
+
Note that a user must be created and configured, as indicated in the previous part of this page.
  
 +
==== Download and install FileZilla ====
  
==== Télécharger et installer FileZilla ====
 
  
FileZilla est gratuit et disponible pour la quasi-totalité des OS actuels ; pour l'installer, il suffit de se rendre sur le site officiel et de sélectionner votre OS, afin de récupérer le fichier exécutable.
+
FileZilla is free and available for almost all current OS ; to install it, just go to the official website and select your OS, in order to recover the executable file.
Son installation se fait simplement en exécutant le fichier récupéré lors du téléchargement ; ce logiciel ne contient pas d'add-ons et est fiable.
+
Its installation is done simply by executing the file recovered during the download; this software does not contain any add-ons and is reliable.
A noter qu'une version portable existe également pour les environnements de permettant pas l'installation de logiciels.
+
Note that a portable version also exists for environments not allowing the installation of software.
  
'''Site officiel :''' <span style="border: 1px red solid; padding: 3px 10px 3px 10px;">https://filezilla-project.org/download.php?show_all=1</span>
+
'''Site official :''' <span style="border: 1px red solid; padding: 3px 10px 3px 10px;">https://filezilla-project.org/download.php?show_all=1</span>
  
Une fois l'installation effectuée, il est conseillé d'effectuer les mises à jour si demandées lors de l'ouverture du logiciel à des fins de sécurité et d'ajouts de fonctions.
+
Once the installation is done, it is advisable to perform the updates if requested when opening the software for security purposes and additions of functions.
  
  
==== Explications du logiciel ====
+
==== Explanations of the software ====
  
[[File:Ftp-doc-4.png]]
+
[[File:Ftp-doc-4.png|center|FileZilla software]]
  
  
FileZilla est composé de 5 zones dont nous allons tenter d'expliquer les fonctions :
+
FileZilla is composed of 5 zones of which we will try to explain the functions :
  
* 1. La zone de logs donne de précieuses informations relatives à la connexion avec le serveur, les erreurs de transfert et les messages d'alertes. En cas de problèmes, veuillez nous fournir les messages présents ici.
+
* 1. The log area provides valuable information about the connection to the server, transfer errors, and alert messages. In case of problems, please provide us with the messages here.
* 2. La zone locale globale permet la recherche de fichiers sur l'ensemble des disques et des équipements réseaux connectés, si présents.
+
* 2. The global local area allows file search on all disks and connected network devices, if present.
* 3. La zone locale restreinte permet la recherche de fichiers sur une zone restreinte des disques et affiche par défauts les dossiers généraux de Windows, par exemple.
+
* 3. The restricted local area allows searching for files on a restricted area of ​​the disks and defaults to Windows general folders, for example.
* 4. La zone distante restreinte est l'affichage des dossiers présents sur l'hébergement à distance.
+
* 4. The remote remote zone is the display of the files present on the remote hosting.
* 5. La zone d'actions directes affiche les transferts en cours, les transferts échoués et leur taux de progression.
+
* 5. The direct actions area shows current transfers, failed transfers and their rate of progress.
  
  
Une fois la connexion effectuée, un simple "glissé-déposé" entre la zone locale (une fois le bon dossier à transférer localisé) permet l'envoi vers le serveur (zone distante restreinte).
+
Once connected, a simple "drag-and-drop" between the local area (once the good folder to transfer localized) allows sending to the server (remote zone restricted).
  
  
==== Configurer FileZilla pour son hébergement ====
+
==== Config FileZilla for his web hosting ====
  
Nous allons désormais configurer FileZilla pour que se dernier puisse se connecter au serveur FTP et plus particulièrement au compte configuré en début de page.
+
We will now configure FileZilla so that it can connect to the FTP server and more specifically to the account configured at the beginning of the page.
  
Pour cela, nous cliquons sur le bouton à l'extrême-gauche du menu du logiciel.
+
For this, we click on the button on the far left of the software menu.
  
Une sous-fenêtre s'ouvre, on clique sur "Nouveau Site", auquel nous donnons un nom facile à mémoriser.
+
A pane opens, we click on "New Site", to which we give a name easy to memorize.
  
  
[[File:Ftp-doc-5.png]]
+
[[File:Ftp-doc-5.png|center|Add new site acces]]
  
  
Dans la colonne de droite de cette nouvelle fenêtre se situent les informations de connexion :  
+
In the right column of this new window are the connection information :  
  
* Hôte : rentrez au choix l'adresse IP de votre hébergement ou votre nom de domaine.
+
* Host: choose the IP address of your hosting or your domain name.
* Port : 21 (Il s'agit du port FTP)
+
* Port: 21 (This is the FTP port)
* Protocole : FTP - Protocole de Transfert de Fichiers
+
* Protocol: FTP - File Transfer Protocol
* Chiffrement : Au choix "Connexion FTP explicite sur TLS si disponible" ou "Connexion FTP simple (non sécurisé)
+
* Encryption: Optional "FTP connection explicit on TLS if available" or "Simple FTP connection (unsecured)
* Type d'authentification : sélectionnez normale (c'est-à-dire un couple identifiant + mot de passe)
+
* Authentication type: select normal (that is, a couple identifier + password)
* Identifiant : le nom d'utilisateur du compte FTP crée dans la première section de cette documentation
+
* Identifier: The username of the FTP account created in the first section of this documentation
* Mot de passe : le mot de passe associé à l'utilisateur FTP crée.
+
* Password: The password associated with the FTP user creates.
  
Dans le troisième onglet "Paramètres de transfert", nous vous recommandons de sélectionner le mode de transfert "Passif".
+
In the third "Transfer Settings" tab, we recommend that you select the "Passive" transfer mode.
  
=== Par WinSCP ===
 
  
Cette section est en cours de rédaction.
+
= Dedicated servers =
  
= Serveurs dédiés =
+
We will see in this section the installation of a minimalist FTP server for sending and retrieving files on a dedicated server.
 
+
We will take as an example an installation under Debian Stretch 9.
Nous verrons dans cette section l'installation d'un serveur FTP minimaliste permettant l'envoi et la récupération de fichiers sur un serveur dédié.
 
Nous prendrons comme exemple une installation sous Debian Stretch 9.
 
  
 
== Installation ==
 
== Installation ==
La première étape est de s'assurer que la machine est correctement à jour :  
+
The first step is to make sure the machine is up to date :  
  
 
  $ apt update && apt upgrade -y
 
  $ apt update && apt upgrade -y
  
Nous utiliserons le serveur FTP léger et sécurisé vsftpd. Pour l'instant sur Debian 9, la commande suivante suffit :
+
We will use the lightweight vsftpd secure FTP server. For now on Debian 9, the following command is enough :
  
 
  $ apt install vsftpd
 
  $ apt install vsftpd
  
Une fois l'installation effectuée, on peut vérifier que le service écoute bien sur le port 21 (port ftp par défaut) :
+
Once installed, we can check that the service listens on port 21 (default ftp port) :
  
 
<pre>$ lsof -i :21
 
<pre>$ lsof -i :21
Line 143: Line 142:
 
</pre>
 
</pre>
  
Si un pare-feu est configuré sur la machine ou en amont (dans les offres Cloudstack par exemple), il sera peut-être nécessaire d'autoriser le port en TCP en entrées et sorties.
+
If a firewall is configured on the machine or upstream (in Cloudstack offerings for example), it may be necessary to allow the port in TCP inputs and outputs.
  
  
== Configuration ==
+
== Config ==
  
Toute la configuration du serveur FTP s'effectue dans le fichier "/etc/vsftpd.conf"
+
All configuration of the FTP server is done in the file "/etc/vsftpd.conf"
Nous allons autoriser le transfert en ascii, par les commandes suivantes :  
+
We will authorize the transfer in ascii, by the following commands :  
  
 
  $ sed -i 's/#ascii_upload_enable=YES/ascii_upload_enable=YES/g' /etc/vsftpd.conf
 
  $ sed -i 's/#ascii_upload_enable=YES/ascii_upload_enable=YES/g' /etc/vsftpd.conf
Line 155: Line 154:
 
   
 
   
  
On autorise également le droit d'écriture aux utilisateurs se connectant :  
+
It also allows the right of writing to the users connecting :  
  
 
  $ sed -i 's/#write_enable=YES/write_enable=YES/g' /etc/vsftpd.conf
 
  $ sed -i 's/#write_enable=YES/write_enable=YES/g' /etc/vsftpd.conf
  
Enfin, on active le SSL afin d'optimiser la sécurité du serveur :  
+
Finally, we enable SSL to optimize server security :  
  
 
  $ sed -i 's/#ssl_enable=YES/ssl_enable=YES/g' /etc/vsftpd.conf
 
  $ sed -i 's/#ssl_enable=YES/ssl_enable=YES/g' /etc/vsftpd.conf
  
Puis on redémarre le serveur vsftpd :  
+
Restart server vsftpd :  
  
 
  $ systemctl restart vsftpd
 
  $ systemctl restart vsftpd
  
== Créer un utilisateur ==
+
== Create user ==
 +
 
 +
You can easily create new vsftpd ftp server users, which by default are similar to system users.
 +
To add a user, you just need to create a new user by useradd and give it a default directory if desired (otherwise it will connect to / home / user):
 +
 
 +
# Create the user and assign him a password
 +
$ adduser user
 +
# Edit user home
 +
$ usermod -d /root/of/the/user folder
 +
# Then give him the right rights
 +
$ chown user /root/of/the/folder
 +
 
 +
== Connection ==
  
Vous pouvez facilement créer de nouveaux utilisateurs du serveur ftp vsftpd, ces derniers étant par défaut similaires aux utilisateurs système.
+
The connection is similar to the method described earlier in this documentation.
Pour ajouter un utilisateur, il vous suffit ainsi de créer un nouvel utilisateur par useradd et lui donner un répertoire par défaut si désiré (sinon il se connectera dans /home/utilisateur) :
 
  
# Créer l'utilisateur et lui affecter un mot de passe
 
$ adduser utilisateur
 
# Modifier l'accueil de l'utilisateur
 
$ usermod -d /chemin/vers/le/dossier utilisateur
 
# Puis lui fournir les bons droits
 
$ chown utilisateur /chemin/vers/le/dossier
 
  
== Connexion ==
+
The host will be the IP address or the A-field of the server
La connexion se fait de manière semblable à la méthode décrite plus haut dans cette documentation.
 
  
L'hôte sera ainsi l'adresse IP ou le champs A du serveur
+
The identifier the system user creates (in our example: "user")
  
L'identifiant l'utilisateur système crée (dans notre exemple : "utilisateur")
+
The password that is created during the user creation step (adduser command)
  
Le mot de passe celui crée pendant l'étape de création de l'utilisateur (commande adduser)
 
  
Le port sera le 21, (lsof -i :21 pour confirmer sur la machine)
+
The port will be 21, (lsof -i: 21 to confirm on the machine)
  
= Problèmes et résolutions =
 
  
[[Catégorie:Serveur dédié]]
+
[[Catégorie:Dedicated server]]
[[Catégorie:Hébergement mutualisé]]
+
[[Catégorie:Web Hosting]]

Revision as of 12:21, 29 August 2019

fr:Guide du transfert par FTP en:FTP Transfer Guide


File Transfer Protocol (FTP) is an easy and convenient way to send files from a local station to an accommodation, or recovering files stored remotely in order to work on them. We will see in this guide the configuration of an FTP account on shared hosting Ikoula, connection through several heavy clients (FileZilla and WinSCP); in a second part, we will focus on setting up an FTP server on a Linux dedicated server.

Web Hosting

The Ikoula hosting packages (IK and IKL ranges) systematically offer the possibility of creating FTP accounts allowing the transfer of files. These accesses are easy to configure and have no time limit.

Account creation and configuration

The configuration is done in two steps :

  • Connect to the Ikoula control panel
  • Configure FTP access

The connection to the Ikoula control panel is done through the email address and password defined when creating your account Ikoula; in case of forgotten password, the eponymous function is available on the login page. For information, the identifiers have been sent to the registration email address in a welcome email.

The address of the control panel is the following (to keep in favorites) : https://order.ikoula.com/cp

Once connected, choose the hosting package in the drop-down list at the top right of the screen :


Choose the hosting package


Then in the subpart that appears after the selection, choose "Acces FTP" :


Choose acces FTP


Dans la nouvelle page qui apparaît, vous devriez à minima constater la présence d'un utilisateur au nom d'aléatoire - It is the default user. Warning : in some IK / IKL packages, only an FTP account is available. We invite you to check the specifications of each pack on the next page: https://www.ikoula.com/en/web-hosting

In case you can add a new account, three parameters are to be determined :


Add new account
  • Where account name will be the FTP account login
  • Where "Main Directory" will be the path in which the user will land when connecting.
  • Where "Password" and "Confirm Password" will be the password associated with the account.

Once validated, the FTP account is immediately created and we can now switch to the connection.

User Login

By FileZilla

FileZilla is one of the popular software ; he supports many protocol including FTP and secure FTP (FTPS). We will see in this documentation information about the configuration of FileZilla allowing you to connect to send your files on your hosting. Note that a user must be created and configured, as indicated in the previous part of this page.

Download and install FileZilla

FileZilla is free and available for almost all current OS ; to install it, just go to the official website and select your OS, in order to recover the executable file. Its installation is done simply by executing the file recovered during the download; this software does not contain any add-ons and is reliable. Note that a portable version also exists for environments not allowing the installation of software.

Site official : https://filezilla-project.org/download.php?show_all=1

Once the installation is done, it is advisable to perform the updates if requested when opening the software for security purposes and additions of functions.


Explanations of the software

FileZilla software


FileZilla is composed of 5 zones of which we will try to explain the functions :

  • 1. The log area provides valuable information about the connection to the server, transfer errors, and alert messages. In case of problems, please provide us with the messages here.
  • 2. The global local area allows file search on all disks and connected network devices, if present.
  • 3. The restricted local area allows searching for files on a restricted area of ​​the disks and defaults to Windows general folders, for example.
  • 4. The remote remote zone is the display of the files present on the remote hosting.
  • 5. The direct actions area shows current transfers, failed transfers and their rate of progress.


Once connected, a simple "drag-and-drop" between the local area (once the good folder to transfer localized) allows sending to the server (remote zone restricted).


Config FileZilla for his web hosting

We will now configure FileZilla so that it can connect to the FTP server and more specifically to the account configured at the beginning of the page.

For this, we click on the button on the far left of the software menu.

A pane opens, we click on "New Site", to which we give a name easy to memorize.


Add new site acces


In the right column of this new window are the connection information :

  • Host: choose the IP address of your hosting or your domain name.
  • Port: 21 (This is the FTP port)
  • Protocol: FTP - File Transfer Protocol
  • Encryption: Optional "FTP connection explicit on TLS if available" or "Simple FTP connection (unsecured)
  • Authentication type: select normal (that is, a couple identifier + password)
  • Identifier: The username of the FTP account created in the first section of this documentation
  • Password: The password associated with the FTP user creates.

In the third "Transfer Settings" tab, we recommend that you select the "Passive" transfer mode.


Dedicated servers

We will see in this section the installation of a minimalist FTP server for sending and retrieving files on a dedicated server. We will take as an example an installation under Debian Stretch 9.

Installation

The first step is to make sure the machine is up to date :

$ apt update && apt upgrade -y
We will use the lightweight vsftpd secure FTP server. For now on Debian 9, the following command is enough :
$ apt install vsftpd
Once installed, we can check that the service listens on port 21 (default ftp port) :
$ lsof -i :21
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
vsftpd  10882 root    3u  IPv6 208338      0t0  TCP *:ftp (LISTEN)

If a firewall is configured on the machine or upstream (in Cloudstack offerings for example), it may be necessary to allow the port in TCP inputs and outputs.


Config

All configuration of the FTP server is done in the file "/etc/vsftpd.conf" We will authorize the transfer in ascii, by the following commands :

$ sed -i 's/#ascii_upload_enable=YES/ascii_upload_enable=YES/g' /etc/vsftpd.conf
$ sed -i 's/#ascii_download_enable=YES/ascii_download_enable=YES/g' /etc/vsftpd.conf

It also allows the right of writing to the users connecting : 
$ sed -i 's/#write_enable=YES/write_enable=YES/g' /etc/vsftpd.conf
Finally, we enable SSL to optimize server security : 
$ sed -i 's/#ssl_enable=YES/ssl_enable=YES/g' /etc/vsftpd.conf
Restart server vsftpd : 
$ systemctl restart vsftpd

Create user

You can easily create new vsftpd ftp server users, which by default are similar to system users. To add a user, you just need to create a new user by useradd and give it a default directory if desired (otherwise it will connect to / home / user):

# Create the user and assign him a password
$ adduser user
# Edit user home
$ usermod -d /root/of/the/user folder
# Then give him the right rights
$ chown user /root/of/the/folder

Connection

The connection is similar to the method described earlier in this documentation.


The host will be the IP address or the A-field of the server

The identifier the system user creates (in our example: "user")

The password that is created during the user creation step (adduser command)


The port will be 21, (lsof -i: 21 to confirm on the machine)


Catégorie:Dedicated server Catégorie:Web Hosting