Google

FTP服务器配置

2007-06-23 13:27 来源: weigongwan.cublog.cn 作者:weigongwan 网友评论 0 条 浏览次数 49

FTP (File Transfer Protocol) 是一种文件传输协议!

1.    启动ftp服务器:

[root@free /]# /etc/rc.d/init.d/vsftpd start

系统开机自动启动服务!

[root@free /]# ntsysv

2.    设置登录权限:

[root@free /]# vi /etc/vsftpd/vsftpd.conf

   # You may specify an explicit list of local users to chroot() to their home

   # directory. If chroot_local_user is YES, then this list becomes a list of

   # users to NOT chroot().                                                                                                                                              

   chroot_list_enable=YES                                    将这行的#去掉

   # (default follows)

   chroot_list_file=/etc/vsftpd.chroot_list              将这行的#去掉

   [root@free /]# vi /etc/vsftpd.chroot_list

   向文件中加入想要限制的用户名!

 

 

3. 设置登录欢迎界面:

  [root@free /]# vi/etc/vsftpd/vsftpd.conf

  # You may fully customise the login banner string:                                                                                                                                        

  ftpd_banner=Welcome to weigw FTP service.    将这行的#去掉

 

 

4.    拒绝帐号使用资源:

[root@free /]# vi /etc/vsftpd.user_list

只需在该文件中加入想要限制的用户名即可

 

 

5.    设置允许匿名上传:

[root@free /]# mkdir /var/ftp/upload                       创建文件夹 

[root@free /]# chown ftp.ftp /var/ftp/upload          设置文件拥有者

[root@free /]# chmod 2755 /var/ftp/upload            设置文件夹权限

   [root@free /]# vi /etc/vsftpd/vsftpd.conf

   # Uncomment this to allow the anonymous FTP user to upload files. This only

   # has an effect if the above global write enable is activated. Also, you will

   # obviously need to create a directory writable by the FTP user.

 将下面这行的#去掉                                                                                                                                                            anon_upload_enable=YES                                                                                                                                                                         

   #                                                             

   # Uncomment this if you want the anonymous FTP user to be able to create

   # new directories

将下面这行的#去掉                                                                                                                                                anon_mkdir_write_enable=YES

添加如下代码ok

   anon_umask=ff022

 

 

上一篇: 下一篇:

相关主题:ftp

网友评论