免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 916 | 回复: 0
打印 上一主题 下一主题

为 proftpd 添加两个用户 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-23 17:08 |只看该作者 |倒序浏览

                最后还是由雷哥完成的,记下来,呵呵……
========================
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
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/68417/showart_1333723.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP