Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网站建设 > 服务器相关 > RedHat AS 4.0 下proftpd服务器的架设
【标  题】:RedHat AS 4.0 下proftpd服务器的架设
【关键字】:RedHat,AS,4.0,proftpd
【来  源】:http://www.cublog.cn/u/9595/showart.php?id=64452

RedHat AS 4.0 下proftpd服务器的架设

Your Ad Here

                        RedHat AS 4.0 proftpd服务器的架设

 

 

 

架设服务器要求:

1.  匿名用户可以访问。

2.  Student用户有上传文件功能,没有删除权限

3.  Teacher用户是ftp服务器管理员。

 

首先从www.proftpd.org下载proftpd的源程序。

wget 下载,这个不用说了。

将下载的文件包放到/home/andy7/soft下,当然也可以放到别的地方。

tar zxvf proftpd-1.2.10.tar.gz

cd proftpd-1.2.10 进到解压的文件里。

./configure –prefix=/etc/proftpd   将我的proftpd安装到这个位置。

Make

Make install

注意在安装的时候,要保证你的linuxgcc已经安装。

 

这个需要个几分钟。

OK

 

下面来设置两个用户:student teacher

groupadd student

useradd student –g student –d /var/ftp/student –s /sbin/nologin 当然你得在/var下建立ftp目录

passwd student 下面给student设置权限。

Useradd –d /var/ftp teacher

Passwd teacher 下面给teacher设置权限

 

Gpasswd –a student teacher

Gpasswd –a teacher student

Chown teacher.teacher /var/ftp

Chmod –r 770 student

Chmod –r 775 ftp

 

我们这个时候到vi /etc/proftpd/etc/proftpd.conf 里把group的值为nogroup改成nobody

OK
我们在到proftpd.conf里把权限设置一下就可以了

下面是我机子上的配置文件

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName                        "proFTPD Default Installation"
ServerType                        standalone
DefaultServer                        on

# Port 21 is the standard FTP port.
Port                                21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                                022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                        30

# Set the user and group under which the server will run.
User                               
  nobody
Group                                nobody
 (这边就是我在上一步所讲的设置成nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~ skate,skate
  (阻止skate组的用户到其他目录,它们只能呆在自家目录)

# Normally, we want files to be overwriteable.
AllowOverwrite                on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>;
  DenyAll
</Limit>;

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous>; section.
<Anonymous ~ftp>;
  User                                ftp
  Group                                ftp

  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                        anonymous ftp

  # Limit the maximum number of anonymous logins
  MaxClients                        10

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin                        welcome.msg
  DisplayFirstChdir                .message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>;
    DenyAll
  </Limit>;
</Anonymous>;


<Directory />;
  
AllowOverwrite on
AllowStoreRestart on
#AllowForeignAddress on
<Limit All>;
AllowAll
</Limit>;
</Directory>;
 

<Directory /var/ftp/skate>;
<Limit DELE RNFR RNTO RMD XRMD>;
DenyUser skate
</Limit>;
</Directory>;
 (这几句是对skate用户的权限限制,只允许它对/var/ftp/skate有写的权限,不允许它有DELE RNFR RNTO RMD XRMD的权限)

<Directory /var/ftp>;
<Limit CMD MKD RNFR DELE RMD RETR STOR READ WRITE DIRS NLST >;
AllowUser tc
</Limit>;
</Directory>;

 

 

 

 

 

 

 

 

好了

试看看吧

提醒:

在配置是要保证你的ip和计算机名要对应起来

不然启动的时候会报错的。

 

 

西电瑞德教育●Andy7  

QQ:150661538  Email:debuglinux@gmail.com

2005-12-9
freebsd自带ftp设置小结:【上一篇】
DNS与BIND学习笔记:【下一篇】
【相关文章】
  • RedHat上VSFTP+MySQL虚拟用户配置过程讲解
  • proftpd.conf
  • proftpd 安装一例
  • proftpd1.2.10在REDHAT AS4下的安装笔记
  • ProFTPD 支持MySQL数据库添加虚拟用户认证及Quotas(磁盘限额)
  • Redhat下Pureftpd的安装配置
  • postfix+mysql+apache+cyrus-sasl2+courier-imap安装
  • we can use follow command to test our spamassassin
  • 续postfix+mysql,添加病毒和垃圾邮件扫描功能,Clamav+SpamAssassin
  • 解釋spamassassin設置的機制哦
  • 【随机文章】
  • Opera 8.0 试用手记
  • 关于土豆、番茄和easymock的争论
  • 借火车看设计过程
  • 精诚EAS-PDA移动商务系统软件
  • PHP+mysql视频教学25讲3.47G免费FTP下载,申请加精
  • COM组件设计与应用14 - 事件和通知(vc.net)
  • OpenVPN使用User/Pass验证登录
  • (三)OSI七层参考模型
  • 使用工厂类模式构建的数据库访问层
  • qemu+kqemu的配置
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.