国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 課堂 > 基礎知識 > 正文

使特定網段用戶能自由上傳下載

2024-09-09 00:42:36
字體:
來源:轉載
供稿:網友
 本人系菜鳥一個,前一段突發奇想做了以下的試驗,現在問題解決了,把解決的方法總結一下,謹供參考,希望能給像我一樣的菜鳥有所幫助。第一次寫總結,總有如履薄冰,如臨深淵的感覺,生怕誤導別人。其中一定會有不妥或是錯誤,或者如果大家有什么更好的方法,希望大家提出來一起討論。
解決過程中不少兄弟熱情幫助尤其是wolfg斑竹的大力支持,十分感謝。

說明:在FC3上用vsftp實FTP服務。由于一些網段的用戶為內部成員,不會對服務器造成危害。為了減少麻煩,更好地實現資源共享,現在想給他們的網段(本例中以10.0.1.*為例)的用戶以自由上傳下載的權利。

涉及的配置文件一共有四個:
vsftpd.conf
hosts.allow
/etc/vsftpd/local.class
/etc/vsftpd/other.class

內容:

hosts.allow
代碼:
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
vsftpd: 10.0.1.* : setenv VSFTPD_LOAD_CONF /etc/vsftpd/local.class
vsftpd: ALL : setenv VSFTPD_LOAD_CONF /etc/vsftpd/other.class


/etc/vsftpd/local.class
代碼:
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES


/etc/vsftpd/other.class
代碼:
write_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO


vsftpd.conf
代碼:
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#

# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
# 不允許本地用戶上傳下載,即只允許基于ip的認證
#local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
# 在ftpd中的local.class和other.class文件中有write_enable=YES項
#write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 小金县| 昌黎县| 中方县| 怀仁县| 奉化市| 阿尔山市| 山东| 勐海县| 钟山县| 屏南县| 班戈县| 天长市| 滦平县| 孝昌县| 灵台县| 七台河市| 汕尾市| 韩城市| 高雄市| 岑溪市| 桑日县| 重庆市| 四子王旗| 长乐市| 泽库县| 隆昌县| 五莲县| 马边| 三穗县| 江陵县| 襄垣县| 驻马店市| 响水县| 文昌市| 黎平县| 宜宾县| 衡山县| 民县| 中超| 共和县| 保康县|