新客网
首页 | 新闻 | 系统·网络·服务器·安全 | 工具·办公 | 编程·数据库 | 图象·网页·运营 | 硬件·存储 | 专题教程 | 论坛·old
 → 当前位置:首页 > 教程 > 网络应用 > 组网技术 > 正文

使特定网段用户能自由上传下载

XKER.COM   2006-11-9 10:50:10  来源:中安网培  收藏本文

本人系菜鸟一个,前一段突发奇想做了以下的试验,现在问题解决了,把解决的方法总结一下,谨供参考,希望能给像我一样的菜鸟有所帮助。第一次写总结,总有如履薄冰,如临深渊的感觉,生怕误导别人。其中一定会有不妥或是错误,或者如果大家有什么更好的方法,希望大家提出来一起讨论。
解决过程中不少兄弟热情帮助尤其是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
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#

# You may override where the log file goes if you like. The default is shown

本新闻共3页,当前在第1页  1  2  3  

上一篇教程:Win 2000平台架设Tomcat教程
下一篇教程:没有了
收藏本文】 【我要投稿】 【打印本文】 【论坛讨论】 【关闭窗口

相关文章
·网络侵权:个人提供非法下载也罚·下载:Total Commander 7.0 Beta1
·另类方法解决离奇断网故障二例·在IIS6中新增可下载文件类型
·天极事件原由及百度回应指责·强烈谴责百度公司恶意操纵搜索结果
·新软快报:迷你迅雷2.0.0.29下载·下载:官方Vista升级建议工具
·下载:Windows Media Player 11·多项更新 QQ2006 Beta2抢鲜下载
·网页制作提高下载速度的两种办法·家庭组网:有线还是无线?您自己掂量着看!
·加大下载资源线程 迅雷再次提速·突破网站常见限制 让你放心下载
·打造安全的企业级FTP服务器·无线网关设备使用和调试方法

学院文章搜索
  
推荐文章
·限制网上行为 从WorkWin限
·无线技术在Linux操作系统中
·其实很简单——防火墙设置
·端口·木马·安全·扫描应
·Windows远程控制完全指南
·十条经典的网站设计与优化
·asp全站防止注入的代码
·整理干净的系统 清理软件使
·嵌入式Linux操作系统启动信
·网页设计配色应用实例剖析
阅读排行
·免费代理IP(每日更新)
·轻松恢复硬盘数据 EasyRec
·windows下如何修改右键菜单
·DOS下对系统重新进行分区
·清除猖狂的Sxs.exe病毒
·DOS常用命令
·编程过把瘾:自己动手写操
·Fdisk分区详解
·DOS下常用的相关网络命令
·超详细:用Macfee打造自己的
专题教程
·PHP教程专题
·MySQL 专题
·数据恢复指南 专题
·Web服务器专题
·DB2 9数据库专题
·ghost教程 专题
·局域网技术专题
·虚拟机专题
·CDN加速技术专题
·注册表教程专题
最新文章
·使特定网段用户能自由上传
·Win 2000平台架设Tomcat教
·Hotmail邮箱存储空间即将扩
·DIV与Table布局在大型网站
·网页制作 谈谈CSS样式表的
·实现办公自动化!按键精灵
·Div + CSS 高度自适应解决
·控制前进倒退
·FLASH动画 命令大集合
·学习Flash心得
·倒播或正播控制
·让SWF文件全屏的效果
·flash实例教程—春雷闪电效
·制作超炫彩色线条图案动画
·Flash中声音的压缩与效果处
设为首页 - 加入收藏 - 版权声明 - 广告服务 - 关于我们 - 联系我们 - 友情连接
Copyright © 2003 - 2006 XKER Inc. All Rights Reserved
新客网 版权所有