|
| |
精品推荐 |
 |
|
| |
|
|
|
|
redhat linux 9.0 VSFTP配置大全
|
日期:2008年5月20日 作者: 查看:[大字体
中字体 小字体]
|
Hello~ Welcome to the home directory This is for test only... 接着,在/home/test1/abc 的目录下新增.message,内容如下: Welcome to abcs directory This is subdir... 那么,当使用者test1 登入时,会看到以下讯息: 230- Hello~ Welcome to the home directory 230- 230- This is for test only... 230- 若是切换到abc 的目录,则会出现以下讯息: 250- Welcome to abcs directory 250- 250- This is subdir ... 3.2.6. 对于每一个联机,以独立的process 来运作 一般启动vsftp 时,我们只会看到一个名为vsftpd 的process 在运作,但若是读者希望每一个联机,都能以独立的process 来呈现,则可执行以下步骤。 Step1. 修改/etc/vsftpd/vsftpd.conf 新增底下一行 setproctitle_enable=YES Step2. 重新启动vsftpd [root@home vsftpd]# /sbin/service vsftpd restart Shutting down vsftpd: OK ] Starting vsftpd for vsftpd: OK ] 使用ps -ef 的指令,可以看告不同使用者联机的情形,如下图所示: [root@home vsftpd]# ps -efgrep ftp root 2090 1 0 16:41 pts/0 00:00:00 vsftpd: LISTENER nobody 2120 2090 0 17:18 ? 00:00:00 vsftpd: 192.168.10.244: connected test1 2122 2120 0 17:18 ? 00:00:00 vsftpd: 192.168.10.244/test1: IDLE nobody 2124 2090 0 17:19 ? 00:00:00 vsftpd: 192.168.10.244: connected test2 2126 2124 0 17:19 ? 00:00:00 vsftpd: 192.168.10.244/test2: IDLE root 2129 1343 0 17:20 pts/0 00:00:00 grep ftp [root@home vsftpd]# 3.2.7. 限制传输档案的速度:本机的使用者最高速度为200KBytes/s,匿名登入者所能使用的最高速度为50KBytes/s Step1. 修改/etc/vsftpd/vsftpd.conf 新增底下两行 anon_max_rate=50000 local_max_rate=200000 Step2. 重新启动vsftpd [root@home vsftpd]# /sbin/service vsftpd restart Shutting down vsftpd: OK ] Starting vsftpd for vsftpd: OK ] 在这边速度的单位为Bytes/s,其中anon_max_rate 所限制的是匿名登入的使用者,而local_max_rate 所限制的是本机的使用者。VSFTPD 对于速度的限制,范围大概在80%到120%之间,也就是我们限制最高速度为100KBytes/s,但实际的速度可能在80KBytes/s 到120KBytes/s 之间,当然,若是频宽不足时,数值会低于此限制。 3.2.8. 针对不同的使用者限制不同的速度:假设test1 所能使用的最高速度为250KBytes/s,test2 所能使用的最高速度为500KBytes/s。 Step1. 修改/etc/vsftpd/vsftpd.conf 新增底下一行 user_config_dir=/etc/vsftpd/userconf Step2. 新增一个目录:/etc/vsftpd/userconf mkdir /etc/vsftpd/userconf Step3. 在/etc/vsftpd/userconf 之下新增一个名为test1 的档案 内容增加一行: local_max_rate=250000 Step4. 在/etc/vsftpd/userconf 之下新增一个名为test2 的档案 内容增加一行: local_max_rate=500000 Step5. 重新启动vsftpd [root@home vsftpd]# /sbin/service vsftpd restart Shutting down vsftpd: OK ] Starting vsftpd for vsftpd: OK ] 3.2.9-1. 建置一个防火墙下的ftp server,使用PORT FTP mode:预设的ftp port:21 以及ftp data port:20 启动VSFTPD 之后执行以下两行指令,只允许port 21 以及port 20 开放,其它关闭。 iptables -A INPUT -p tcp -m multiport --dport 21,20 -j ACCEPT iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset
上一篇:用vsftp建立个人ftp站点
下一篇:微软全球36种语言推出新版的Hotmail
|
| 相关文章: |
|
|
|
| 相关软件: |
|
|
|
|