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