centos 7安裝配置vsftpd

yum install -y vsftpd?#安裝vsftpd

yum install -y psmisc net-tools systemd-devel libdb-devel perl-DBI ?#安裝vsftpd虛擬用戶配置依賴包

systemctl enable vsftpd.service??#設置vsftpd開機啟動

cp /etc/vsftpd/vsftpd.conf ? /etc/vsftpd/vsftpd.conf-bak?#備份默認配置文件

?

?

編輯 /etc/vsftpd/vsftpd.conf?

?

使之成為如下內容

?

?

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
userlist_enable=YES
userlist_deny=yes
userlist_file=/etc/vsftpd/user_list
tcp_wrappers=YES

?

dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
tcp_wrappers=YES
banner_file=/etc/vsftpd/welcome.txt
#chroot
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
local_max_rate=1000000
listen_port=21
idle_session_timeout=300
data_connection_timeout=1
guest_enable=YES
guest_username=apps
user_config_dir=/etc/vsftpd/vconf
virtual_use_local_privs=YES

ftp_data_port=10020

pasv_enable=yes
pasv_min_port=10060
pasv_max_port=10090
pasv_addr_resolve=YES
pasv_address=121.201.24.233

accept_timeout=5
connect_timeout=1
allow_writeable_chroot=YES

編輯/etc/vsftpd/welcome.txt?

touch /etc/vsftpd/chroot_list?

vim?/etc/vsftpd/virtusers ?建立虛擬用戶名單

admin

WJ8gqMUbArtIsmGRF9W4

第一行是賬號,第二行是密碼

用下面的命令生成虛擬用戶文件

db_load -T -t hash -f /etc/vsftpd/virtusers /etc/vsftpd/virtusers.db

修改權限為 600

chmod 600 /etc/vsftpd/virtusers.db

在/etc/pam.d/vsftpd的文件頭部加入以下信息,一定要加在頭部,不能加在其他地方。

vi /etc/pam.d/vsftpd

auth sufficient /lib64/security/pam_userdb.so?db=/etc/vsftpd/virtusers

account sufficient /lib64/security/pam_userdb.so?db=/etc/vsftpd/virtusers

新建系統用戶apps,用戶目錄為/home/apps

useradd apps -d /home/apps

chown apps:apps /home/apps -R

這里我們用應用本身的賬號apps 來代替新建賬號

建立虛擬用戶個人Vsftp的配置文件

mkdir /etc/vsftpd/vconf

cd /etc/vsftpd/vconf

mkdir -p /home/apps/admin

vi admin?#編輯用戶web1配置文件,其他的跟這個配置文件類似

local_root=/home/apps/admin

write_enable=YES

anon_world_readable_only=NO

anon_upload_enable=YES

anon_mkdir_write_enable=YES

anon_other_write_enable=YES

重啟FTP

systemctl restart vsftpd.service

備注:

guest_username=apps?#指定虛擬用戶的宿主用戶(就是我們前面新建的用戶)

guest_username=apps?#如果ftp目錄是指向網站根目錄,用來上傳網站程序,可以指定虛擬用戶的宿主用戶為Tomcat運行賬戶apps,可以避免很多權限設置問題

轉載于:https://www.cnblogs.com/hyming011/p/8086823.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390493.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390493.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390493.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

amazeui學習筆記--css(基本樣式3)--文字排版Typography

amazeui學習筆記--css(基本樣式3)--文字排版Typography 一、總結 1、字體:amaze默認非 襯線字體(sans-serif) 2、引用塊blockquote和定義列表:引用塊blockquote和定義列表(dl dt)注意…

劍指 Offer 46. 把數字翻譯成字符串

給定一個數字,我們按照如下規則把它翻譯為字符串:0 翻譯成 “a” ,1 翻譯成 “b”,……,11 翻譯成 “l”,……,25 翻譯成 “z”。一個數字可能有多個翻譯。請編程實現一個函數,用來計…

Zend?Guard?7?,?Zend?Guard?Loader處理PHP加密

環境:使用Zend Guard 7 軟件加密。 PHP 5.6 LNMP 一鍵安裝,PHP5.6Zend Guard Loader (對應的版本文件)是已經安裝好了,還要安裝 opcache.so ,直接在lnmp 安裝教程中有。因為自動安裝 的 版本并不對應,于…

qr碼是二維碼碼_如何使用QR碼進行有效的營銷和推廣

qr碼是二維碼碼Efficient means doing things right. Effective is about doing the right things.高效意味著做正確的事。 有效就是做正確的事。 I am an advocate for efficiency and effectiveness. There must be a more efficient way to share contact details other th…

ELK學習記錄三 :elasticsearch、logstash及kibana的安裝與配置(windows)

注意事項: 1.ELK版本要求5.X以上 2.Elasticsearch5.x版本必須基于jdk1.8,安裝環境必須使用jdk1.8 3.操作系統windows10作為測試環境,其他環境命令有差異,請注意 4.本教程適合完全離線安裝 5.windows版本ELK安裝包下載路徑&#xf…

【quickhybrid】JSBridge的實現

前言 本文介紹quick hybrid框架的核心JSBridge的實現 由于在最新版本中,已經沒有考慮iOS7等低版本,因此在選用方案時沒有采用url scheme方式,而是直接基于WKWebView實現 交互原理 具體H5和Native的交互原理可以參考前文的H5和Native交互原理 …

mongodb atlas_如何使用MongoDB Atlas將MERN應用程序部署到Heroku

mongodb atlas簡介 (Introduction to MERN) In this article, well be building and deploying an application built with the MERN stack to Heroku.在本文中,我們將構建和部署使用MERN堆棧構建的應用程序到Heroku。 MERN, which stands for MongoDB, Express, R…

面試題 10.02. 變位詞組

編寫一種方法,對字符串數組進行排序,將所有變位詞組合在一起。變位詞是指字母相同,但排列不同的字符串。 注意:本題相對原題稍作修改 示例: 輸入: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], 輸出: [ [“ate”,…

智能合約設計模式

2019獨角獸企業重金招聘Python工程師標準>>> 設計模式是許多開發場景中的首選解決方案,本文將介紹五種經典的智能合約設計模式并給出以太坊solidity實現代碼:自毀合約、工廠合約、名稱注冊表、映射表迭代器和提款模式。 1、自毀合約 合約自毀…

如何使用1Password,Authy和Privacy.com外包您的在線安全性

Take some work off your plate while beefing up security with three changes you can make today.通過今天可以進行的三項更改來增強安全性,同時省下一些工作。 Unstable times are insecure times, and we’ve already got enough going on to deal with. When…

「CodePlus 2017 12 月賽」火鍋盛宴

n<100000種食物&#xff0c;給每個食物煮熟時間&#xff0c;有q<500000個操作&#xff1a;在某時刻插入某個食物&#xff1b;查詢熟食中編號最小的并刪除之&#xff1b;查詢是否有編號為id的食物&#xff0c;如果有查詢是否有編號為id的熟食&#xff0c;如果有熟食刪除之…

5815. 扣分后的最大得分

給你一個 m x n 的整數矩陣 points &#xff08;下標從 0 開始&#xff09;。一開始你的得分為 0 &#xff0c;你想最大化從矩陣中得到的分數。 你的得分方式為&#xff1a;每一行 中選取一個格子&#xff0c;選中坐標為 (r, c) 的格子會給你的總得分 增加 points[r][c] 。 然…

您有一個上云錦囊尚未領取!

前期&#xff0c;我們通過文章《確認過眼神&#xff1f;上云之路需要遇上對的人&#xff01;》向大家詳細介紹了阿里云咨詢與設計場景下的五款專家服務產品&#xff0c;企業可以通過這些專家服務產品解決了上云前的痛點。那么&#xff0c;當完成上云前的可行性評估與方案設計后…

怎么從運營轉到前端開發_我如何在16個月內從銷售人員轉到前端開發人員

怎么從運營轉到前端開發On August 18, 2015, I was on a one-way flight headed to Copenhagen from Toronto Pearson Airport. I was starting my two semester exchange at the Copenhagen Business school. 2015年8月18日&#xff0c;我乘坐單程飛機從多倫多皮爾遜機場前往哥…

Python os.chdir() 方法

概述 os.chdir() 方法用于改變當前工作目錄到指定的路徑。 語法 chdir()方法語法格式如下&#xff1a; os.chdir(path) 參數 path -- 要切換到的新路徑。 返回值 如果允許訪問返回 True , 否則返回False。 實例 以下實例演示了 chdir() 方法的使用&#xff1a; #!/usr/bin/pyth…

oracle認證考試_Oracle云認證–通過此3小時免費課程通過考試

oracle認證考試This Oracle Cloud Certification exam will take – on average – about one week of study to prepare for. Most people who seriously commit to their studies are ready to pass the exam within about four days.這項Oracle Cloud認證考試平均需要大約一…

git 修改遠程倉庫源

自己已經寫好了一個項目&#xff0c;想上傳到 github github 創建新項目 新建 README.md &#xff0c; LICENSE 本地項目添加 github 遠程倉庫源 不是git項目git remote add origin https://USERNAME:PASSWORDgithub.com/USERNAME/pro.git已是git項目&#xff0c;先刪除再添加 …

Docker 常用命令備忘錄

build鏡像docker build -t"name" . 復制代碼后臺運行docker run -d -i -t 14a21c118315 /bin/bash 復制代碼刪除鏡像docker image rmi -f 300de37c15f9 復制代碼停止運行的鏡像docker ps docker kill (id) 復制代碼進入鏡像docker attach 29f2ab8e517c(ps id) 復制…

mvp最小可行產品_最低可行產品–如何為您的項目建立MVP以及為什么要這樣做

mvp最小可行產品具有足夠功能的產品可以收集全面的定性反饋 (A product with just enough features to gather comprehensive qualitative feedback) Proof of concept, prototypes, wireframes, mockups… what actually constitutes a Minimum Viable Product (MVP)?概念驗證…

composer 更改為中國鏡像

composer 更改為中國鏡像 $ composer config -g repo.packagist composer https://packagist.phpcomposer.com 轉載于:https://www.cnblogs.com/love-snow/articles/8111410.html