FTP-server: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(10 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 1: | Regel 1: | ||
− | + | Een FTP-server installeren? Weet je dat zeker? Bedenk dat FTP een onveiligig protocol is [https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-ubuntu-12-04]: | |
<pre> | <pre> | ||
Regel 7: | Regel 7: | ||
</pre> | </pre> | ||
− | + | * Zelf maak ik alleen gebruik van SSH om toegang te krijgen tot externe servers | |
+ | * Van de alternatieve protocolllen, wordt ''sFTP'' het meest genoemd. Het betreft FTP over SSH [https://wiki.archlinux.org/index.php/List_of_applications#FTP_servers] | ||
− | '' | + | De rest van dit artikel heeft uitsluitend betrekking op 'gewoon' FTP, wat dat ook precies moge zijn -- Zal wel iets met een handshake op poort 21 zijn plus communicatie over een willekeurige andere poort ofzo. En verder heeft het enkel betrekking op Linux. |
− | == Long list (dec. 2016) | + | == FTP servers - Selectie == |
+ | |||
+ | ''' Long list (dec. 2016) ''' | ||
* bFTPd [https://wiki.archlinux.org/index.php/List_of_applications#FTP_servers] | * bFTPd [https://wiki.archlinux.org/index.php/List_of_applications#FTP_servers] | ||
Regel 19: | Regel 22: | ||
* wsFTPd [http://www.launchers.nl/2012/01/mijn-ervaringen-met-vps-hosting-tot-nu-toe/] | * wsFTPd [http://www.launchers.nl/2012/01/mijn-ervaringen-met-vps-hosting-tot-nu-toe/] | ||
− | + | ''' Short list (dec. 2016) ''' | |
vsFTPd. Redenen: | vsFTPd. Redenen: | ||
Regel 26: | Regel 29: | ||
* Deze [https://wiki.archlinux.org/index.php/List_of_applications#FTP_servers Archlinux-pagina] omschrijft het als ''Lightweight, stable and secure FTP server for UNIX-like systems'' | * Deze [https://wiki.archlinux.org/index.php/List_of_applications#FTP_servers Archlinux-pagina] omschrijft het als ''Lightweight, stable and secure FTP server for UNIX-like systems'' | ||
* Min-of-meer de standaard Ubuntu-FTP-server. | * Min-of-meer de standaard Ubuntu-FTP-server. | ||
+ | |||
+ | == Casus: Installatie vsFTP voor mezelf (nov. 2017) == | ||
+ | |||
+ | Dit is de eenvoudigste casus: Alleen zelf kunnen inloggen | ||
+ | |||
+ | * Dit betreft een ''quick & dirty'' installatie voor tijdelijk gebruik, binnen een testomgeving | ||
+ | * Hoe het werkt: vsFTP maakt gebruik van ''accounts''. Dat zijn de gebruikelijke UNIX inlogaccounts. Dus op m'n eigen laptop is er maar één zo'n account, namelijk dat van mezelf. Als ik na installatie & configuratie inlog, beland ik dus in ''/home/strompf/'' | ||
+ | |||
+ | === Installatie & configuratie === | ||
+ | |||
+ | Installatie is simpel: | ||
+ | |||
+ | sudo apt-get install vsftpd | ||
+ | |||
+ | Configuratie gaat via bestand ''/etc/vsftpd.conf''. Dit is wat ik heb aangepast, conform [https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-ubuntu-12-04]: | ||
+ | |||
+ | <pre> | ||
+ | ########################################################################### | ||
+ | # anynoymous_enable | ||
+ | ########################################################################### | ||
+ | # | ||
+ | # Allow anonymous FTP? (Disabled by default). | ||
+ | # | ||
+ | anonymous_enable=NO | ||
+ | |||
+ | ########################################################################### | ||
+ | # local_enable | ||
+ | ########################################################################### | ||
+ | # | ||
+ | # Uncomment this to allow local users to log in. | ||
+ | # | ||
+ | local_enable=YES | ||
+ | |||
+ | ########################################################################### | ||
+ | # write_enable | ||
+ | ############################################################################ | ||
+ | # | ||
+ | # Uncomment this to enable any form of FTP write command. | ||
+ | # | ||
+ | write_enable=YES | ||
+ | </pre> | ||
+ | en | ||
+ | <pre> | ||
+ | ############################################################################## | ||
+ | # chroot_local_user | ||
+ | ############################################################################## | ||
+ | # | ||
+ | # You may restrict local users to their home directories. See the FAQ for | ||
+ | # the possible risks in this before using chroot_local_user or | ||
+ | # chroot_list_enable below. | ||
+ | # | ||
+ | # Oftewel: beperk gebruikers tot hun eigen account (natuurlijk!) | ||
+ | # | ||
+ | chroot_local_user=YES | ||
+ | </pre> | ||
+ | |||
+ | === Resultaat === | ||
+ | |||
+ | {| | ||
+ | |[[file:20171115-1517.png|thumb|Voilà: Via <code>ftp://localhost</code> krijg ik m'n gewone Linux-thuismap te zien, dus <code>/home/strompf/</code>. Al die bestanden met grootte 0, zijn links. Wo. de link ''www'', die naar <code>/var/www/</code> verwijst. Op die manier kan ik via FTP bij alle virtuele domeinen (brrr!)]] | ||
+ | |} | ||
+ | |||
+ | == Casus: Tijdelijke vps-kloon met FTP-toegang (nov. 2017) == | ||
+ | |||
+ | === Casus === | ||
+ | |||
+ | * Twee externe partijen toegang geven tot twee domeinen | ||
+ | * Gewoon FTP | ||
+ | |||
+ | === Plan van Aanpak === | ||
+ | |||
+ | * Bestaande vps klonen | ||
+ | * Alle domeinen, databases & scripts verwijderen (op de twee benodigde domeinen na) | ||
+ | * Computer-account maken voor die externe partijen | ||
+ | * FTP-server installeren alsof het om één account gaat | ||
+ | * DNS-entries van die twee domeinnamen aanpassen. | ||
+ | |||
+ | === Acties === | ||
+ | |||
+ | * VPS geklooned | ||
+ | * Naam nieuwe VPS aanpassen, om vergissingen te voorkomen: | ||
== Bronnen == | == Bronnen == | ||
Regel 32: | Regel 116: | ||
* https://www.transip.nl/forum/forum/prm/5 | * https://www.transip.nl/forum/forum/prm/5 | ||
− | ''' | + | ''' vsFTPd ''' |
− | |||
* https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-ubuntu-12-04 | * https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-ubuntu-12-04 | ||
* https://help.ubuntu.com/lts/serverguide/ftp-server.html | * https://help.ubuntu.com/lts/serverguide/ftp-server.html | ||
Regel 41: | Regel 124: | ||
* https://help.ubuntu.com/community/vsftpd | * https://help.ubuntu.com/community/vsftpd | ||
* https://ubuntuforums.org/showthread.php?t=518293 | * https://ubuntuforums.org/showthread.php?t=518293 | ||
+ | |||
+ | ''' vsFTPd & virtual domains ''' | ||
+ | |||
+ | * http://www.sigerr.org/linux/setup-vsftpd-custom-multiple-directories-users-accounts-ubuntu-step-by-step/ |
Huidige versie van 15 nov 2017 om 14:39
Een FTP-server installeren? Weet je dat zeker? Bedenk dat FTP een onveiligig protocol is [1]:
Warning: FTP is inherently insecure. If you must use FTP, consider securing your FTP connection with SSL/TLS. Otherwise, it is best to use SFTP, a secure alternative to FTP.
- Zelf maak ik alleen gebruik van SSH om toegang te krijgen tot externe servers
- Van de alternatieve protocolllen, wordt sFTP het meest genoemd. Het betreft FTP over SSH [2]
De rest van dit artikel heeft uitsluitend betrekking op 'gewoon' FTP, wat dat ook precies moge zijn -- Zal wel iets met een handshake op poort 21 zijn plus communicatie over een willekeurige andere poort ofzo. En verder heeft het enkel betrekking op Linux.
FTP servers - Selectie
Long list (dec. 2016)
Short list (dec. 2016)
vsFTPd. Redenen:
- Meest-genoemde
- Deze Archlinux-pagina omschrijft het als Lightweight, stable and secure FTP server for UNIX-like systems
- Min-of-meer de standaard Ubuntu-FTP-server.
Casus: Installatie vsFTP voor mezelf (nov. 2017)
Dit is de eenvoudigste casus: Alleen zelf kunnen inloggen
- Dit betreft een quick & dirty installatie voor tijdelijk gebruik, binnen een testomgeving
- Hoe het werkt: vsFTP maakt gebruik van accounts. Dat zijn de gebruikelijke UNIX inlogaccounts. Dus op m'n eigen laptop is er maar één zo'n account, namelijk dat van mezelf. Als ik na installatie & configuratie inlog, beland ik dus in /home/strompf/
Installatie & configuratie
Installatie is simpel:
sudo apt-get install vsftpd
Configuratie gaat via bestand /etc/vsftpd.conf. Dit is wat ik heb aangepast, conform [14]:
########################################################################### # anynoymous_enable ########################################################################### # # Allow anonymous FTP? (Disabled by default). # anonymous_enable=NO ########################################################################### # local_enable ########################################################################### # # Uncomment this to allow local users to log in. # local_enable=YES ########################################################################### # write_enable ############################################################################ # # Uncomment this to enable any form of FTP write command. # write_enable=YES
en
############################################################################## # chroot_local_user ############################################################################## # # You may restrict local users to their home directories. See the FAQ for # the possible risks in this before using chroot_local_user or # chroot_list_enable below. # # Oftewel: beperk gebruikers tot hun eigen account (natuurlijk!) # chroot_local_user=YES
Resultaat
Casus: Tijdelijke vps-kloon met FTP-toegang (nov. 2017)
Casus
- Twee externe partijen toegang geven tot twee domeinen
- Gewoon FTP
Plan van Aanpak
- Bestaande vps klonen
- Alle domeinen, databases & scripts verwijderen (op de twee benodigde domeinen na)
- Computer-account maken voor die externe partijen
- FTP-server installeren alsof het om één account gaat
- DNS-entries van die twee domeinnamen aanpassen.
Acties
- VPS geklooned
- Naam nieuwe VPS aanpassen, om vergissingen te voorkomen:
Bronnen
vsFTPd
- https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-ubuntu-12-04
- https://help.ubuntu.com/lts/serverguide/ftp-server.html
- http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/
- https://security.appspot.com/vsftpd.html
- https://help.ubuntu.com/community/vsftpd
- https://ubuntuforums.org/showthread.php?t=518293
vsFTPd & virtual domains