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

Construction steps of ftp in linux Environment

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

Share

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

This article mainly introduces "the steps of building ftp in linux environment". In the daily operation, I believe that many people have doubts about the steps of building ftp in linux environment. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "steps for building ftp in linux environment". Next, please follow the editor to study!

1. Check whether the vsftpd software is installed

[root@linux01 ~] # rpm-qa vsftpd

[root@linux01 ~] #

2. Install vsftpd

[root@linux01 media] # yum-y install vsftpd

3. Related orders

[root@linux01 ~] # rpm-qa | grep vsftp

Vsftpd-2.2.2-21.el6.x86_64

[root@linux01 ~] # service vsftpd start

Starting vsftpd for vsftpd: [OK]

[root@linux01 ~] # service vsftpd status

Vsftpd (pid 3074) is running...

[root@linux01 vsftpd] # service vsftpd stop

Shutting down vsftpd: [OK]

4. Related configuration

There are three main configuration files for ftp, located in the / etc/vsftpd/ directory, which are:

Ftpusers this file is used to specify which users cannot access the ftp server.

User_list the default account indicated by this file does not have access to ftp by default, only if the userlist_enable=NO option is enabled in the vsftpd .conf configuration file

Main configuration file for vsftpd.conf vsftpd

[root@linux01 vsftpd] # cat vsftpd.conf | grep-v'^ #'

Anonymous_enable=YES

Local_enable=YES

Write_enable=YES

Local_umask=022

Dirmessage_enable=YES

Xferlog_enable=YES

Connect_from_port_20=YES

Xferlog_std_format=YES

Listen=YES

Pam_service_name=vsftpd

Userlist_enable=YES

Tcp_wrappers=YES

-[root@linux01 vsftpd] # sestatus-b | grep ftp

Allow_ftpd_anon_write off

Allow_ftpd_full_access off

Allow_ftpd_use_cifs off

Allow_ftpd_use_nfs off

Ftp_home_dir off

Ftpd_connect_db off

Ftpd_use_fusefs off

Ftpd_use_passive_mode off

Httpd_enable_ftp_server off

Tftp_anon_write off

Tftp_use_cifs off

Tftp_use_nfs off

[root@linux01 vsftpd] # setsebool ftp_home_dir on

[root@linux01 vsftpd] # sestatus-b | grep ftp

Allow_ftpd_anon_write off

Allow_ftpd_full_access off

Allow_ftpd_use_cifs off

Allow_ftpd_use_nfs off

Ftp_home_dir on

Ftpd_connect_db off

Ftpd_use_fusefs off

Ftpd_use_passive_mode off

Httpd_enable_ftp_server off

Tftp_anon_write off

Tftp_use_cifs off

Tftp_use_nfs off

-- should be able to log in normally at this point.

If you need anonymous users to log in, you need to uncomment the following two items

Anon_upload_enable=YES

Anon_mkdir_write_enable=YES

--

If you need to restrict users from accessing other directories (by default), you need to uncomment the following

# chroot_list_enable=YES

Create a chroot_list file to add users who need to restrict directories.

[root@linux01 vsftpd] # vi chroot_list

[root@linux01 vsftpd] # cat chroot_list

Oracle

--

Create a user

Adduser-s / bin/nologin-d / var/ftp/test test

At this point, the study on "the steps of building ftp in linux environment" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Servers

Wechat

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

12
Report