Stawianie serwera ftp
: 03 lis 2008, 15:40
Jest jakiś program do stawiania serwera FTP pod Linuks?
search.php?searchid=2130455
search.php?searchid=2130455
Polskie forum użytkowników Ubuntu
https://ubuntu.pl/forum/
Kod: Zaznacz cały
sudo apt-get install proftpd
Kod: Zaznacz cały
sudo mcedit /etc/proftpd/proftpd.conf
Tworzymy teraz grupęInclude /etc/proftpd/modules.conf
UseIPv6 off
ServerName "Nazwa_Serwera"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
#ta opcja zapobiega wydostaniu się uzytkownika do innych kont ftp
DefaultRoot ~
#DisplayLogin welcome.msg
#DisplayFirstChdir .message
ListOptions "-l"
DenyFilter \*.*/
UseReverseDNS off
IdentLookups off
#tutaj wyłączamy sprawdzanie powłoki /bin/bash zamieniając to na /bin/false
RequireValidShell off
#sciezka do pliku ftpd.passwd który utworzymy
AuthUserFile /home/ftpd.passwd
Port 21
MaxInstances 30
#uzytkownik i grupa
User serwer
Group ftpusers
Umask 022 022
AllowOverwrite on
# PersistentPasswd off
# UseSendFile off
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
<IfModule mod_tls.c>
TLSEngine off
</IfModule>
<IfModule mod_quota.c>
QuotaEngine on
</IfModule>
<IfModule mod_ratio.c>
Ratios on
</IfModule>
# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=d ... 2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine on
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>
# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group nogroup
# # We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# # Cosmetic changes, all files belongs to ftp user
DirFakeUser on ftp
DirFakeGroup on ftp
#
RequireValidShell off
#
# # Limit the maximum number of anonymous logins
MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
<Directory /home/ftp>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
#
# # Uncomment this if you're brave.
# # <Directory incoming>
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # <Limit READ WRITE>
# # DenyAll
# # </Limit>
# # <Limit STOR>
# # AllowAll
# # </Limit>
# # </Directory>
#
</Anonymous>
Kod: Zaznacz cały
sudo addgroup ftpusers
Kod: Zaznacz cały
sudo adduser serwer --ingroup ftpusers --shell /bin/false --no-create-home
Kod: Zaznacz cały
mkdir /home/serwer
Kod: Zaznacz cały
chown serwer:ftpusers /home/serwer
Kod: Zaznacz cały
chmod 751 /home/serwer
Kod: Zaznacz cały
ftpasswd --shell /bin/false --home /home/serwer/folder -p --name login --uid 1013 --gid 1008
Kod: Zaznacz cały
/etc/init.d/proftpd restart
Polecam lekturę:hidden pisze:Witam!
Mam problem przy okazji. Postawiłem vsftpd i niestety nie mogę sie z nim połączyć np przez FileZilla. Jedyna możliwość to winscp, a chciałbym udostępnić ftp klientowi czasami. Poza tym przez winscp, pomimo configuracji, mogę latać po całym systemie, a to już jest niedopuszczalne. Pomocy.