Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Linux installs the ftp service

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Linux how to install ftp service", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux how to install ftp service" this article.

Linux installs the ftp service-step 1. First connect to your own Linux server. My Linux is CentOS 62. Check if the vsftpd service is installed on the Linux server.

Rpm-qa | grep vsftpd

If the content in the above figure is displayed, it is installed.

You can use rpm-e vsftpd-2.2.2-24.el6.x86_64 to uninstall. (this step can be ignored)

3. If there is no installation, install

Yum-y install vsftpd

4. After installation is complete, modify the vsftpd configuration

Vi / etc/vsftpd/vsftpd.conf

Open the vsftpd.conf configuration file and press I to enter edit mode

Change anonymous_enable=YES to anonymous_enable=NO

When the modification is complete, press Esc to exit edit mode, and then enter the command (: wq) to save and exit. Note that the colon is in English.

5. Restart the vsftpd service

Service vsftpd restart

6. Create a user for ftp

Ftp username: testftp, password testftp, and bind the user to / var/ftp/testftp

Useradd-d / var/ftp/testftp testftp

Set the password:

Passwd testftp

Enter the password, which is not displayed under Linux

7. Open firewall port 21

Iptables-I INPUT-m state-- state NEW-m tcp-p tcp-- dport 21-j ACCEPT

Aving: service iptables save

Restart: service iptables restart

8. Test whether it is successful in the browser

Enter ftp://ip in the browser address bar

Enter your user name and password to access it.

9. Permission setting

If 550 Create directory operation failed appears when creating a new folder. (550 error), or an error in switching directories, it should be caused by no permission!

Vi / etc/selinux/config

Open configuration and set the value of SELINUX to disabled

Restart the ftp service

10. Specify ftp home directory

To modify the root directory of ftp, you only need to modify the / etc/vsftpd/vsftpd.conf file

Vi / etc/vsftpd/vsftpd.conf

Add the following three lines

Local_root=/var/www/html

Chroot_local_user=YES

Anon_root=/var/www/html

Local_root for system users; anon_root for anonymous users

Chmod 755 / var/ftp/testftp

Then restart the ftp service

At this point, any user access will be specified under / var/ftp/testftp: the root directory of ftp is set to /.

This ends the FTP configuration!

Service vsftpd start starts the ftp command

Service vsftpd stop stop ftp command

Service vsftpd restart restart ftp command

The above is all the contents of the article "how to install ftp Services in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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: 226

*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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report