In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the steps of configuring ProFTPD and VSFTPD under Ubuntu". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn the steps of configuring ProFTPD and VSFTPD under Ubuntu.
Linux VPS users generally use SFTP/SCP protocol to connect OpenSSH Server for file transfer, but sometimes you want some users to only upload files to the website directory, but not log in to the system to execute commands and access other directories, then you can use FTP Server to achieve. FTP Server commonly used on Linux are VSFTPD and ProFTPD, of which ProFTPD is easy to use and has good functions. Here we take ProFTPD as an example to build a FTP server. Of course, FTP can also be used as a way of file sharing on your local area network. For example, your roommate uses Windows to upload a movie to your Ubuntu ProFTPD PC, so that you don't have to use a flash drive to copy it, and other roommates can download movies from your ProFTPD.
ProFTPD
Proftpd is configured in a way similar to apache and is easier to use than vsftpd, so xampp integrates proftpd.
The code is as follows:
Sudo apt-get install proftpd-basic
When installing, proftpd runs as a standalone server by default. If there are few ftp requests every day, it can be installed as an inetd service to save server resources.
Here I use the default value, which is installed as standalone server.
The code is as follows:
Sudo netstat-antp | grep proftpd
View port 21 monitored by proftpd
Create a new virtual user test with the ftpasswd provided by proftpd and set the password:
The code is as follows:
Sudo mkdir-p / png/proftpd
Sudo ftpasswd\
-- passwd\
-- file=/png/proftpd/passwd\
-- name=test\
-- uid=122\
-- gid=65534\
-- home=/srv/ftp\
-- shell=/bin/false
Among them, uid and gid I use the uid and gid of the system user ftp:nogroup created automatically when installing proftpd, execute cat / etc/passwd | grep ftp is visible.
/ srv/ftp is the directory that is automatically created when you install proftpd. The owner is ftp:nogroup and the permission is 755. 0.
In this way, the virtual user test can read and write to the directory by logging in / srv/ftp as the system user ftp:nogroup.
The read and write permissions of FTP Server on Linux are mapped to the system UGO (User Group Other).
When creating virtual users, the read and write control is realized by setting system users uid and gid, and reasonably configuring the / srv/ftp directory and its file permissions.
When creating a new user, execute the above command again and change some parameters as needed.
For example, I created a virtual user with a login directory of / png/www/example.com and a system user running with a uid:gid of 1000.
The code is as follows:
Eechen:
Sudo ftpasswd\
-- passwd\
-- file=/png/proftpd/passwd\
-- name=eechen\
-- uid=1000\
-- gid=1000\
-- home=/png/www/example.com\
-- shell=/bin/false
You do not need to overload proftpd to create a user, because proftpd reads the authentication file each time it authenticates.
The code is as follows:
Sudo chown proftpd:nogroup / png/proftpd/passwd
Set passwd file read and write permissions to ensure that proftpd can read the file.
The code is as follows:
Sudo nano / etc/proftpd/proftpd.conf is added at the end:
DefaultRoot ~ # limits users to their own directories, and the above test users correspond to / srv/ftp
RequireValidShell off # disable Shell request authentication
AuthOrder mod_auth_file.c # authentication method sequence. File authentication is used here.
AuthUserFile / png/proftpd/passwd # files that store usernames and passwords
The code is as follows:
Sudo service proftpd reload
Overloading makes the configuration effective
FileZilla provides a unified binary package for Linux, which can be decompressed and run without installation:
Http://sourceforge.net/projects/filezilla/files/FileZilla_Client/
Memory (RES) usage of ProFTPD when using virtual users test and eechen to establish a ftp connection in FileZilla:
Simple configuration of vsftpd
Configuration file
Pass through
The code is as follows:
Sudo gedit / etc/vsftpd.conf
Modify.
The configuration file is relatively simple, as follows
Code:
The code is as follows:
# start in stand-alone mode
Listen=YES
# allow 4 clients to connect at the same time, with a maximum of 5 processes per IP
Max_clients=200
Max_per_ip=4
# do not allow anonymous users to access, allow local (system) users to log in
Anonymous_enable=NO
Local_enable=YES
Write_enable=NO
# whether to use port 20 for data transmission
Connect_from_port_20=YES
# generate logs
Xferlog_enable=YES
# specify login to go to directory
Local_root=/home/ftp/ftp
In this way, on the computer with the same local area network, you can log in with my IP address, the account number "ftp" and the corresponding password, which is specified in the passwd sentence in the first step.
By the way, don't forget to restart the ftp service after changing the configuration
Code:
The code is as follows:
Sudo / etc/init.d/vsftpd restart
In addition, there is a command to open and close the service.
Code:
The code is as follows:
Sudo / etc/init.d/vsftpd start
Sudo / etc/init.d/vsftpd stop
At this point, I believe you have a deeper understanding of the "steps to configure ProFTPD and VSFTPD under Ubuntu". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.