Professional Documents
Culture Documents
FTP Install Ubuntu
FTP Install Ubuntu
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
CRRL x
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www
CTRL X - fechar
Y
Enter
user_sub_token=$USER
local_root=/var/www
pasv_min_port=40000
pasv_max_port=50000
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
CTRL + x
S
---------------------------------------------------------
1 - Copia de segurança
---------------------------------------------------------
chroot_local_user=YES
Instrua seu servidor FTP para limitar esta lista de usuários a seus próprios
diretórios pessoais editando vsftpd.conf :
chroot_local_user=YES
chroot_list_file=/etc/vsftpd.chroot_list
---------------------------------------------------------
Reinicie o serviço vsftpd :
Para que isso funcione, os usuários precisam ser configurados com uma conta shell
no servidor FTP. Isso adicionará uma camada de criptografia segura ao seu tráfego
de FTP. Para configurar o FTPS, abra seu arquivo vsftpd.conf em um editor e
adicione as seguintes linhas:
ssl_enable=YES
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
---------------------------------------------------------
Reinicie o serviço para aplicar as alterações:
UFW
sudo apt install ufw.
sudo nano /etc/default/ufw (V6)
IPV6=yes
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw allow 2222