In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "Linux installation vsFTPd server detailed tutorial," interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's take you to learn "Linux installation vsFTPd server detailed tutorial" bar!
The ftp server program we use is vsftpd, which is one of the most popular open source FTP servers under Linux.
Install vsftpd server program
The traditional way to install Linux software is to download the tar.gz installation package, or RPM installation package, extract it and compile it, or install it with RPM-i command. The process is cumbersome, we use yum command to install online, so you can automatically select the latest version of the program, very convenient.
Enter yum install vsftpd and press y to confirm installation. When "Complete! "means the installation is complete.
Then type chkconfig vsftpd on service vsftpd start to set vsftpd to boot and start the vsftpd service.
Modify vsftpd configuration file
vsftpd configuration file default location: /etc/vsftpd/vsftpd.conf, usually need to backup a copy of the original configuration file, and then edit, the specific steps are as follows:
Type mv vsftpd.conf vsftpd.conf-old to rename the vsftpd.conf file vsftpd.conf-old backup, type vi /etc/vsftpd/vsftpd.conf to create and edit the vsftpd.conf file.
Open the new vsftpd.conf file and write it as follows:
anonymous_enable=NO//Anonymous user logins are prohibited. Usually ftp on our web server does not allow anonymous logins.
local_enable=NO//disable (or allow) local user login
write_enable=YES//grant write permission
chroot_local_user=YES//lock user directory, ftp user login ftp can only operate in their own directory
anon_upload_enable=NO
anon_mkdir_write_enable=NO//Disable anonymous users from uploading and creating directories
dirmessage_enable=YES//Allow ftp users to list file directories
xferlog_enable=YES//write log
connect_from_port_20=YES
listen=YES//Use port 20, usually default
pam_service_name=vsftpdpamconf
userlist_enable=YES
tcp_wrappers=YES//Important, specifies pam validation profile
guest_enable=YES//Enable virtual user
guest_username=apache//Specify the permission of the virtual user to use the local user apache. This is especially important. The ftp virtual user on the web server must be set to apache permission, otherwise the files uploaded by ftp cannot be accessed normally, and the files generated by the website cannot be modified.
user_config_dir=/etc/vsftpd/vuser_conf//virtual user configuration file location
virtual_use_local_privs=YES//Virtual user uses local user rights, this must be present, otherwise ftp user cannot change file rights
Then save and exit vi editor, execute: service vsftpd restart, restart vsftpd service to test whether the configuration file is written correctly.
Add vsftpd virtual account:
We want to create a virtual user db library in the directory/etc/vsftpd:
Enter vi vuservsftpd.txt to create and edit the file vuservsftpd.txt, write the virtual user and password you want to create, single line user name double line password, note that there can be no spaces, such as:
vuser1
password1
vuser2
password2
After the establishment is completed, save and exit, and then use db command to generate vsftpd to verify the virtual user library file you need to use:
db -T -t hash -f vuservsftpd.txt vsftpdpamconf.db//Note that the db file name should be the same as the pam authentication name set in vsftpd.conf
For security, you can delete the newly created vuservsftpd.txt file, and create a new one the next time you need to add a user name. You can also set the vsftpdpamconf.db file permissions to 644.
Add vsftpd virtual account profile:
Virtual accounts will not take effect without corresponding configuration files. In step 1, we determined the configuration file directory of virtual accounts in the vsftpd.conf file as: /etc/vsftpd/vuser_conf. Below we enter this directory to work:
The name of the configuration file must be the same as the virtual account name, so we created two new files: vuser1 and vuser2, and wrote the following configuration information as needed:
local_root=/var/www/html/demo//Set the virtual user's directory, because we need to implement an ftp account management for each website, so his root directory is the virtual directory of the website we need to manage.
write_enable=YES
download_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES//Gives the virtual user other permissions such as write, download, upload, and create directories
anon_world_readable_only=no//I don't understand what this means, but it must exist
You can add or cancel some permissions according to your needs. To cancel, you only need to add a "#" in front of the statement, or you can delete it directly.
Now the FTP configuration of the Linux server is successful, and you can test whether it can be used normally.
At this point, I believe that everyone has a deeper understanding of the "Linux installation vsFTPd server detailed tutorial", may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to 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.