日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
如何進(jìn)行CentOSvsftpd安裝系統(tǒng)帳戶設(shè)置

CentOS vsftpd安裝系統(tǒng)

1、更新系統(tǒng)

在正陽等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè) 網(wǎng)站設(shè)計(jì)制作按需定制制作,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),成都全網(wǎng)營銷,成都外貿(mào)網(wǎng)站建設(shè)公司,正陽網(wǎng)站建設(shè)費(fèi)用合理。

在安裝vsftpd之前,首先需要更新系統(tǒng)的軟件包,執(zhí)行以下命令:

sudo yum update

2、安裝EPEL源

由于CentOS默認(rèn)的YUM源不包含vsftpd,需要安裝EPEL源,執(zhí)行以下命令:

sudo yum install epel-release

3、安裝vsftpd

執(zhí)行以下命令安裝vsftpd:

sudo yum install vsftpd

4、啟動(dòng)vsftpd服務(wù)

安裝完成后,啟動(dòng)vsftpd服務(wù):

sudo systemctl start vsftpd

5、設(shè)置開機(jī)自啟

為了確保vsftpd在系統(tǒng)啟動(dòng)時(shí)自動(dòng)運(yùn)行,需要設(shè)置開機(jī)自啟,執(zhí)行以下命令:

sudo systemctl enable vsftpd

系統(tǒng)帳戶設(shè)置

1、創(chuàng)建用戶和組

首先需要?jiǎng)?chuàng)建一個(gè)用于FTP訪問的用戶和組,執(zhí)行以下命令:

sudo groupadd ftpusers
sudo useradd -g ftpusers -s /sbin/nologin -d /var/ftp ftpuser

這里我們創(chuàng)建了一個(gè)名為ftpusers的組,并創(chuàng)建了一個(gè)名為ftpuser的用戶,該用戶的主目錄被設(shè)置為/var/ftp,將ftpuser的登錄shell設(shè)置為/sbin/nologin,使其無法登錄系統(tǒng),這是為了保證FTP服務(wù)器的安全性。

2、修改vsftpd配置文件

接下來需要修改vsftpd的配置文件,以便允許新創(chuàng)建的用戶訪問FTP服務(wù)器,打開配置文件:

sudo vi /etc/vsftpd/vsftpd.conf

找到以下行:

Allow local users to log in.
local_enable=YES
Allow anonymous FTP? (ie. not logged in)? If set to YES then only anonymous login is allowed. If set to NO then only authenticated users are allowed! Default value is NO! (=NO)
anonymous_enable=NO
Allow anonymous FTP? (ie. not logged in)? If set to YES then only anonymous login is allowed. If set to NO then only authenticated users are allowed! Default value is NO! (=NO)
anon_upload_enable=YES      Allow anonymous upload of files? (ie. without login)? If set to YES then anonymous users can upload files. Default value is NO! (=NO)         anon_mkdir_write_enable=YES      Allow anonymous creation of directories? If set to YES then anonymous users can create new directories. Default value is NO! (=NO)         anon_other_write_enable=YES      Allow anonymous write access other than uploading and creating directories? If set to YES then anonymous users can modify existing files and download new files. Default value is NO! (=NO)         anon_root=/tmp      The default directory for anonymous users when they connect with no account. Default value is /var/ftp/pub/Anonymous  anon_uid=$UID        The default user id for anonymous users if not specified by the client. Default value is $UID anon_gid=$GID         The default group id for anonymous users if not specified by the client. Default value is $GID         pasv_min_port=40000      The minimum port number that may be used by passive connections. Default value is 40000         pasv_max_port=40009      The maximum port number that may be used by passive connections. Default value is 40009         pasv_address=127.0.0.1      The IP address to use for passive connections. Default value is 127.0.0.1         For security reasons, you should consider changing this to a non-localhost address if possible.         listen=YES             Listen for incoming client connections on the local machine instead of forwarding them to a virtual server or portmapper instance. Default value is yes.         listen_ipv6=YES      Enable IPv6 support for the listener. Default value is yes.        pam_service_name=vsftpd         Use the named pam module for authentication (refer to "UsePAM" below). This option overrides the above setting for this particular virtual server. Default value is yes (which means use the built-in vsftpd authentication).        userlist_enable=YES      When userlist_enable=YES, a list of allowed and denied users will be stored in this file: /etc/vsftpd/user_list (default). See also 'userlist_deny' and 'userlist_allow' options in this section. Default value is NO (which means no userlist file will be created).        userlist_deny=NO      When userlist_deny=YES, an entry in the userlist file will deny a connection attempt if the remote user is listed in this file. Default value is NO (which means no entries will be added to the userlist file).        userlist_file=/etc/vsftpd/user_list      Set the pathname of the userlist file where the list of allowed and denied users will be stored. See also 'userlist_enable' and 'userlist_deny' options in this section. Default value is /etc/vsftpd/user_list        chroot_local_user=YES      Change the working directory of local users when they log in through the shell (default = no chroot). Default value是YES(即chroot到其主目錄)。        chroot_list_enable=YES      Allow configuration of which users are allowed to log in as root via chroot(). Default value是NO(即不允許任何用戶通過chroot登錄為root)。        chroot_list_file=/etc/vsftpd/chroot_list      Set the pathname of the file containing a list of users who are allowed to log in as root via chroot(). Default值是/etc/vsftpd/chroot_list        xferlog_enable=YES      Enable logging of data transfer events that occur during FTP sessions using the XFER command or PASV command. Default value是YES(即記錄事件)。        xferlog_file=/var/log/xferlog      Set the pathname of the file where XFER and PASV transfer log events will be stored. Default值是/var/log/xferlog        connect_from_port_20=YES      Allow clients to connect from any port but only if all ports below are closed by other processes on the server (i.e. no other services listening on those ports). Default value是NO(即只允許從指定端口連接)。        connect_from_port=21-60      Allow clients to connect from any port between the range 21 and 60, inclusive of both ends of the range. Default value是21-60(即只允許從指定端口范圍連接)。        secure_chroot_dir=/var/run/vsftpd      The directory where VSFTPD will store information about secure chroot operations (such as open sockets). Default value是${HOME}/run/vsftpd(即存儲(chǔ)信息的位置為${HOME}/run/vsftpd)。        force_local_data_ssl=NO      Force SSL encryption of data transfers even when connecting from behind a NAT (Network Address Translation) router or firewall that supports it (this option requires SSL support in both client and server). Default value是NO(即不強(qiáng)制使用SSL加密數(shù)據(jù)傳輸)。        force_local_logins=YES      Force local logins only when using SSL encryption (this option cannot be combined with force_local_data_ssl). Default value是NO(即可以使用SSL加密或明文進(jìn)行本地登錄)。        tls_local_data=YES      Enable use of local SSL certificates for data transfers (only required if force_local_data_ssl or force_local_logins has been enabled). Default value是NO(即不使用本地SSL證書)。        tls_auth_only=NO      Enable use of OpenSSL client authentication (requires OpenSSL library installed and configured). Default value是YES(即啟用OpenSSL客戶端認(rèn)證)。        tls_verify=NO      Do not verify peer certificates when communicating with servers over SSL or TLS connections (this option cannot be combined with force_local_data_ssl). Default value是YES(即驗(yàn)證對(duì)等證書)。        autoprivanon=YES      When autoprivanon is enabled, private directory permissions are automatically changed after each session ends so that a new session cannot read files written by previous sessions unless explicitly allowed by the user or administrator. This can help prevent unauthorized access to sensitive information on a public network where multiple people might use the same computer at once. Default value是YES(即啟用自動(dòng)匿名模式)。        pasv_enable=YES      Enable passive mode data transfer (PASV), which allows clients to connect directly

當(dāng)前文章:如何進(jìn)行CentOSvsftpd安裝系統(tǒng)帳戶設(shè)置
轉(zhuǎn)載注明:http://m.5511xx.com/article/djshihj.html