PROFTPD
Autor: Fabio Biancardi | Publicado: 2013-03-12T17:31:00-03:00






Instalação Servidor ProFtp no Debian


Logue no terminal como root e digite:

# aptitude install proftpd

Na instalação ira surgir a tela abaixo, de acordo com as informações escolha a melhor opção.












Configuração do ProFTPD



Para configuração do ProFTPD é necessário criar um diretório onde será a base do servidor, como exemplo abaixo, criei a pasta proftpd na raiz /







root@zeus:/# mkdir proftpd







Após criar o diretório é&nbsp;necessário&nbsp;dar permissão de acesso, execute o comando abaixo &nbsp;





root@zeus:/# chmod 777 proftpd



Também é necessário criar um usuário e um grupo para ser configurado no arquivo de configuração&nbsp;



Criando o usuário:

root@zeus:/# adduser admin



informe a senha





Criando o Grupo T.I:



root@zeus:/# &nbsp;groupadd ti



Editando o Arquivo de Configuração do ProFTPD



O arquivo de configuração do ProFTPD fica no diretório /etc/proftpd



root@zeus:/# cd /etc/proftpd



root@zeus:/etc/proftpd# vi proftpd.conf





#

# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.

# To really apply changes reload proftpd after modifications.

#



# Includes DSO modules

Include /etc/proftpd/modules.conf



# Set off to disable IPv6 support which is annoying on IPv4 only boxes.

UseIPv6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; on &nbsp;Para IPV4 mude essa opção para off

# If set on you can experience a longer connection delay in many cases.

IdentLookups &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;off



ServerName &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"Debian"

ServerType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;standalone

DeferWelcome &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;off



MultilineRFC2228 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;on

DefaultServer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; on

ShowSymlinks &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;on



TimeoutNoTransfer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 600

TimeoutStalled &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;600

TimeoutIdle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1200



DisplayLogin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;welcome.msg

DisplayChdir &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.message true

ListOptions &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "-l"



DenyFilter &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\*.*/







# Port 21 is the standard FTP port.

Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;21





# To prevent DoS attacks, set the maximum number of child processes

# to 30. &nbsp;If you need to allow more than 30 concurrent connections

# at once, simply increase this value. &nbsp;Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit maximum number of processes per service

# (such as xinetd)

MaxInstances &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;30



# Set the user and group that the server normally runs at.

User &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;admin &nbsp;usuário&nbsp;criado acima

Group &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ti &nbsp; &nbsp; &nbsp; &nbsp;grupo criado acima&nbsp;





DefaultRoot /proftpd/ &nbsp;Informe o caminho do&nbsp;diretório&nbsp;a ser utilizado, " acima criamos o diretorio

&lt;Directory /proftpd/&gt; &nbsp;Informe o caminho do&nbsp;diretório&nbsp;a ser utilizado &nbsp; &nbsp;proftp"

AllowOverwrite on &nbsp; &nbsp; &nbsp;daqui para baixo é para liberar o acesso ao diretório

&lt;Limit WRITE&gt;

AllowAll

&lt;/Limit&gt;

&lt;Limit CREATE&gt;

AllowAll

&lt;/Limit&gt;

&lt;Limit EXECUTE&gt;

AllowAll

&lt;/Limit&gt;

&lt;/Directory&gt;



Pronto, agora é só salvar o arquivo de configuração e reiniciar o serviço com o comando abaixo



root@zeus:/etc/proftpd# /etc/init.d/proftpd restart

Stopping ftp server: proftpd.

Starting ftp server: proftpd.

root@zeus:/etc/proftpd#&nbsp;



Para acessar o FTP digite em seu navegar:



ftp://ip_do_seu_servidor



Ira aparecer um Janela pedindo Login e senha