Difference between revisions of "Setup ftp server on linux with VSFTPD"
From DevOps Notebook
(Created page with "Depending on distro, install it first: CentOS: <pre> # yum install vsftpd # OR # dnf install vsftpd </pre> Debian: <pre> # apt install vsftpd </pre> Edit /etc/vsftpd/vsftpd.c...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Depending on distro, install it first | + | Depending on distro, install it first.<br> |
− | CentOS: | + | CentOS:<br> |
<pre> | <pre> | ||
# yum install vsftpd # OR | # yum install vsftpd # OR | ||
# dnf install vsftpd | # dnf install vsftpd | ||
</pre> | </pre> | ||
− | Debian: | + | Debian: <br> |
<pre> | <pre> | ||
# apt install vsftpd | # apt install vsftpd |
Latest revision as of 09:58, 25 August 2021
Depending on distro, install it first.
CentOS:
# yum install vsftpd # OR # dnf install vsftpd
Debian:
# apt install vsftpd
Edit /etc/vsftpd/vsftpd.conf
anonymous_enable=NO chroot_local_user=YES pasv_enable=YES pasv_min_port=1024 pasv_max_port=1048 pasv_address=<public_ip> local_root=/var/www/html
Restart and enable
# systemctl restart vsftpd # systemctl enable vsftpd
Create FTP user
# adduser <USERNAME> # passwd <USERNAME> # usermod -d /var/www/html <USERNAME> # usermod -a -G www <USERNAME>