亚洲人成色在线观看,亚洲人成网亚洲欧洲无码久久,亚洲av日韩av天堂久久,亚洲爆乳精品无码一区二区,亚洲av永久无码精品网站色欲

  • 微信
    咨詢
    微信在線咨詢 服務(wù)時間:9:00-18:00
    縱橫數(shù)據(jù)官方微信 使用微信掃一掃
    馬上在線溝通
  • 業(yè)務(wù)
    咨詢

    QQ在線咨詢 服務(wù)時間:9:00-18:00

    選擇下列產(chǎn)品馬上在線溝通

    縱橫售前-老古
    QQ:519082853 售前電話:18950029581
    縱橫售前-江夏
    QQ:576791973 售前電話:19906048602
    縱橫售前-小李
    QQ:3494196421 售前電話:19906048601
    縱橫售前-小智
    QQ:2732502176 售前電話:17750597339
    縱橫售前-燕子
    QQ:609863413 售前電話:17750597993
    縱橫值班售后
    QQ:407474592 售后電話:400-1886560
    縱橫財務(wù)
    QQ:568149701 售后電話:18965139141

    售前咨詢熱線:

    400-188-6560

    業(yè)務(wù)姚經(jīng)理:18950029581

  • 關(guān)注

    關(guān)于縱橫數(shù)據(jù) 更多優(yōu)惠活動等您來拿!
    縱橫數(shù)據(jù)官方微信 掃一掃關(guān)注官方微信
  • 關(guān)閉
  • 頂部
  • 您所在的位置 : 首頁 > 新聞公告 > 美國站群服務(wù)器中centos7 ftp服務(wù)的使用

    美國站群服務(wù)器中centos7 ftp服務(wù)的使用

    1. 美國站群服務(wù)器中匿名用戶的ftp服務(wù)
    確認已經(jīng)安裝vsftpd
    [root@localhost ~]# rpm -qa | grep vsftpd
    [root@localhost ~]# yum -y install vsftpd
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    --> Running transaction check
    ---> Package vsftpd.x86_64 0:3.0.2-25.el7 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved
    ======================================================================================
    Package           Arch              Version                    Repository       Size
    ======================================================================================
    Installing:
    vsftpd            x86_64            3.0.2-25.el7               vase            171 k

    Transaction Summary
    ======================================================================================
    Install  1 Package

    Total download size: 171 k
    Installed size: 353 k
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
     Installing : vsftpd-3.0.2-25.el7.x86_64                                         1/1
     Verifying  : vsftpd-3.0.2-25.el7.x86_64                                         1/1
    Installed:
     vsftpd.x86_64 0:3.0.2-25.el7                                                        
    Complete!

    美國站群服務(wù)器中修改配置
    [root@localhost ~]# vim /etc/vsftpd/vsftpd.conf
    12 anonymous_enable=YES #是否允許匿名用戶訪問ftp
    29 anon_upload_enable=YES #取消注釋 表示匿名用戶可以上傳文件
    33 anon_mkdir_write_enable=YES#取消注釋  表示匿名用戶可以創(chuàng)建目錄
    創(chuàng)建目錄 用戶驗證(匿名用戶在ftp服務(wù)的根目錄是/var/ftp/ 也就是說 匿名用戶登陸ftp服務(wù)之后 如果執(zhí)行cd / 那么它其實是切換到了ftp服務(wù)器的/var/ftp目錄)
    [root@localhost ~]# mkdir /var/ftp/one
    [root@localhost ~]# touch /var/ftp/one/a.txt
    啟動服務(wù)
    [root@localhost ~]# systemctl start vsftpd
    處理防火墻和selinux
    [root@localhost ~]# firewall-cmd --permanent --add-service=ftp
    success
    [root@localhost ~]# firewall-cmd --reload
    success
    [root@localhost ~]# setenforce 0
    客戶端驗證
    [root@localhost ~]# rpm -qa | grep ftp
    [root@localhost ~]# yum -y install ftp
    [root@localhost ~]# ftp 192.168.20.132
    Connected to 192.168.20.132 (192.168.20.132).
    220 (vsFTPd 3.0.2)
    Name (192.168.20.132:root): ftp #匿名用戶登陸 此處寫ftp
    331 Please specify the password.
    Password:  #不輸入密碼  直接回車
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    227 Entering Passive Mode (192,168,20,132,254,180).
    150 Here comes the directory listing.
    drwxr-xr-x    2 0        0              19 May 07 07:51 one
    drwxr-xr-x    2 0        0               6 Oct 30  2018 pub
    226 Directory send OK.
    ftp> ls /  #此處可以驗證前邊的說法 匿名用戶的根目錄就是/var/ftp
    227 Entering Passive Mode (192,168,20,132,238,71).
    150 Here comes the directory listing.
    drwxr-xr-x    2 0        0              19 May 07 07:51 one
    drwxr-xr-x    2 0        0               6 Oct 30  2018 pub
    226 Directory send OK.
    驗證匿名用戶是否有創(chuàng)建目錄的權(quán)限
    ftp> mkdir /one/two
    550 Create directory operation failed. #創(chuàng)建目錄失敗

    解決辦法如下
    原因: 服務(wù)器端/var/ftp目錄的屬主不是ftp用戶 需要改過來
    [root@localhost ~]# ll /var/
    total 8
    drwxr-xr-x.  2 root root    6 Apr 11  2018 adm
    drwxr-xr-x.  5 root root   44 Mar 14 15:49 cache
    drwxr-xr-x.  2 root root    6 Aug  8  2019 crash
    drwxr-xr-x.  3 root root   34 Mar 14 15:49 db
    drwxr-xr-x.  3 root root   18 Mar 14 15:48 empty
    drwxr-xr-x   4 root root   28 May  7 15:51 ftp
    [root@localhost ~]# chown -R ftp /var/ftp/one
    改完屬主 再次測試
    [root@localhost ~]# ftp 192.168.20.132
    Connected to 192.168.20.132 (192.168.20.132).
    220 (vsFTPd 3.0.2)
    Name (192.168.20.132:root): ftp
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> mkdir /one/two
    257 "/one/two" created
    ftp> ls one
    227 Entering Passive Mode (192,168,20,132,152,32).
    150 Here comes the directory listing.
    -rw-r--r--    1 14       0               0 May 07 07:51 a.txt
    drwx------    2 14       50              6 May 07 08:12 two
    226 Directory send OK.

    2. 基于本地用戶驗證的ftp服務(wù)
    修改配置
    [root@localhost ~]# vim /etc/vsftpd/vsftpd.conf
    16 local_enable=YES #運行本地用戶登陸ftp服務(wù)
    101 chroot_local_user=YES# 取消注釋 表示將本地用戶限制在根目錄(本地用戶在ftp服務(wù)中的根目錄是本地 用戶的家目錄 如果不進行限制 本地用戶登陸ftp服務(wù)之后 可以在服務(wù)器的任何一個目錄 隨意游走 不安全)
    102 allow_writeable_chroot=YES #新添加的 表示 將用戶限制在根目錄后 允許其有可寫的權(quán)限
    服務(wù)端添加本地用戶 用于驗證
    [root@localhost ~]# useradd usera
    [root@localhost ~]# passwd usera
    Changing password for user usera.
    New password:
    BAD PASSWORD: The password is shorter than 8 characters
    Retype new password:
    passwd: all authentication tokens updated successfully.
    在用戶家目錄創(chuàng)建文件 用戶后續(xù)驗證
    [root@localhost ~]# touch /home/usera/a.txt
    [root@localhost ~]# mkdir /home/usera/one
    重啟服務(wù)
    [root@localhost ~]# systemctl restart vsftpd
    在客戶端驗證本地用戶的ftp
    [root@localhost ~]# ftp 192.168.20.132
    Connected to 192.168.20.132 (192.168.20.132).
    220 (vsFTPd 3.0.2)
    Name (192.168.20.132:root): usera #此處寫剛才添加的普通用戶usera
    331 Please specify the password.
    Password: #此處寫usera的密碼
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls #查看ftp根目錄下的文件有哪些
    227 Entering Passive Mode (192,168,20,132,46,190).
    150 Here comes the directory listing.
    -rw-r--r--    1 0        0               0 May 07 08:27 a.txt
    drwxr-xr-x    2 0        0               6 May 07 08:27 one
    226 Directory send OK.
    ftp> mkdir two #創(chuàng)建目錄
    257 "/two" created
    ————————————————

    縱橫數(shù)據(jù)新上的美國站群服務(wù)器8C 現(xiàn)貨
    限量特價 速定! cn2限量一人3臺
    E5 16G 1T 8C 232IP  
    E5*2 32G 1T 8C 232IP
    E5*2 32G 2T 8C 232IP  
    E5*2 32G 3T 8C 232IP
    美國站群服務(wù)器 美國高防御服務(wù)器 歡迎在線客服 QQ 4001886560

    最新推薦


    微信公眾帳號
    關(guān)注我們的微信