Chinaunix首页 | 论坛 | 博客
  • 博客访问: 298047
  • 博文数量: 26
  • 博客积分: 2585
  • 博客等级: 少校
  • 技术积分: 399
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-06 20:24
文章分类

全部博文(26)

文章存档

2011年(1)

2010年(7)

2009年(3)

2008年(15)

我的朋友

分类: LINUX

2008-10-23 17:08:31

最后还是由雷哥完成的,记下来,呵呵……
========================
Target:

1、Add two new users, student and teacher, for a ftp server, which is already running for other users.
2、Add directory /var/www/content. User student can only upload files into this direcory, while teacher has all permission.

========================
Software:
proftpd-1.3.1

========================
Details:

Install a new proftpd
++++++++++++++++++++++++
#wget ftp://ftp1.at.proftpd.org/ProFTPD/distrib/source/proftpd-1.3.1.tar.gz
#tar xvzf proftpd-1.3.1.tar.gz
#cd /root/proftpd-1.3.1
#./configure  --sysconfdir=/etc --prefix=/usr/local/proftpd
#make 
#make install
 
Add user: teacher and student
++++++++++++++++++++++++
#useradd -g ftp -d /var/www/content -s /sbin/nologin teacher
#useradd -g ftp -d /var/www/content -s /sbin/nologin student
#passwd teacher
#passwd student
 
Edit file /etc/proftpd:
++++++++++++++++++++++++
Add these lines:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#######this is for teacher and student in /var/www/content####### (2008-10-20)
### teacher: (All for /var/www/content)
#
### student: (Only upload for /var/www/content)
#
##################
 
####First teacher:#####

        User    teacher
        Group   ftp
        AnonRequirePassword             on
        RequireValidShell               off
        # Limit the maximum number of anonymous logins
        MaxClients                    100
        MaxClientsPerHost             3
        TransferRate  RETR            50000000

 
####Second student:#####

        User    student
        Group   ftp
        AnonRequirePassword             on
        RequireValidShell               off
        # Limit the maximum number of anonymous logins
        MaxClients                    100
        MaxClientsPerHost             10
        TransferRate  RETR            50000000
       
        AllowOverwrite off
        umask 000
               
                        Allowall
               

               
                        DenyAll
               

       


 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

To admin proftp:
++++++++++++++++++++++++
#service proftpd start
#service proftpd restart
#service proftpd stop
阅读(1914) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~