Ubuntu7.04 install and use proftp-Linux Enterprise Application-Linux server application information. For details, refer to the following section. This article is intended for those who want to share files with their friends using the ftp protocol, just like FTPserU in windows. The method I provide is not unique and I hope my method is clear enough. this FTPserver can only be used by people with the correct password, so you must understand that only known users can read your FTP service.
1-use the following command to install proftpd:
Code:
Sudo apt-get install proftpd
2-Add the following code in etc/shells (sudo gedit/etc/shells to open the file) (in command line mode, sudo vi/etc/shells ):
Code:
/Bin/false
Create a/home/FTP-shared directory:
Code:
Cd/home
Sudo mkdir FTP-shared
Create a userftp user that can only be used to read ftp. this user does not need a valid shell (more secure), so select/bin/false shell to userftp,/home/FTP-shared as the main directory.
To make this part clearer, I will give the command line for this operation:
Code:
Sudo useradd userftp-p your_password-d/home/FTP-shared-s/bin/false
Create a download and an upload directory under the FTP-shared directory:
Code:
Cd/home/FTP-shared/
Sudo mkdir download
Sudo mkdir upload
Now let's set the corresponding permissions for them:
Code:
Cd/home
Sudo chmod 755 FTP-shared
Cd FTP-shared
Sudo chmod 755 downloading
Sudo chmod 777 upload
3-now, go to the proftpd configuration file:
Code:
Sudo gedit/etc/proftpd. conf // pay special attention to the path. What I previously gave is wrong.
Of course, you can edit your own proftpd. conf as needed:
Code:
# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on
# Choose here the user alias you want !!!!
UserAlias sauron userftp
ServerName "ChezFrodon"
ServerType standalone
DeferWelcome on
MultilineRFC2228 on
DefaultServer on
ShowSymlinks off
# It's better for debug to create log files ;-)
ExtendedLog/var/log/ftp. log
TransferLog/var/log/xferlog
SystemLog/var/log/syslog. log
# DenyFilter \*.*/
# I don't choose to use/etc/ftpusers file (set inside the users you want to ban, not useful for me)
UseFtpUsers off
# Allow to restart a download
AllowStoreRestart on
# Port 21 is the standard FTP port, so don't use it for security reasons (choose here the port you want)
Port 1980
# To prevent DoS attacks, set the maximum number of child processes
# To 30. If you need to allow more than 30 concurrent connections
# At once, simply increase this value. Note that this ONLY works
# In standalone mode, in inetd mode you shoshould use an inetd server
# That allows you to limit maximum number of processes per service
# (Such as xinetd)
MaxInstances 8
# Set the user and group that the server normally runs.
User nobody
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (Second parm) from being group and world writable.
Umask 022 022
# Display a message after a successful login
AccessGrantMsg "welcome !!! "
# This message is displayed for each access good or not
ServerIdent on "you're at home"
# Set/home/FTP-shared directory as home directory
DefaultRoot/home/FTP-shared
# Lock all the users in home directory, ***** really important *****
DefaultRoot ~
MaxLoginAttempts 5
# VALID LOGINS
AllowUser userftp
DenyALL
Umask 022 022
AllowOverwrite off
DenyAll
Umask 022 022
AllowOverwrite off
DenyAll
Umask 022 022
AllowOverwrite on
DenyAll
AllowAll
Now that you have completed proftpd configuration, your service port is 1980, and the read parameters are as follows: User: sauron, password: the one you set for userftp.
Perform a syntax check on your proftpd:
Code:
Sudo proftpd-td5
If you want to know who is connected to your service and use the ftptop command (use the letter "t" to change the display frequency), you can also use the "ftpwho" command.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.