Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1654511
  • 博文数量: 135
  • 博客积分: 2820
  • 博客等级: 少校
  • 技术积分: 2544
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-16 13:33
文章分类

全部博文(135)

文章存档

2015年(1)

2014年(8)

2013年(16)

2012年(43)

2011年(56)

2010年(11)

分类: LINUX

2013-06-08 16:06:53


点击(此处)折叠或打开

  1. 1、只能上传。不能下载、删除、重命名。

  2. cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST

  3. 方法2:

  4. chown_uploads=YES
  5. chown_username=root

  6. 2、只能下载。不能上传、删除、重命名。write_enable=NO
  7. 3、只能上传、删除、重命名。不能下载。download_enable=NO
  8. 4、只能下载、删除、重命名。不能上传。

  9. cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,RNFR,RNTO,RETR,DELE,SIZE,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST

  10. 以上的2、3两点好控制,可是1和4就不是那么好控制了!
  11. 这个命令就实现了只能下载上传、不能删除了。具体命令介绍如下:
  12.  

  13. CWD - change working directory 更改目录

  14. LIST - list remote files 列目录

  15. MKD - make a remote directory 新建文件

  16. NLST - name list of remote directory

  17. PWD - print working directory 显示当前工作目录

  18. RETR - retrieve a remote file 下载文件

  19. STOR - store a file on the remote host 上传文件

  20.  

  21. DELE - delete a remote file 删除文件

  22. RMD - remove a remote directory 删除目录

  23. RNFR - rename from 重命名

  24. RNTO - rename to 重命名

  25.  

  26. 以上是常用的一些参数,大家对照学习一下!下面是列也的全部参数,供大家参考!

  27. # ABOR - abort a file transfer 取消文件传输

  28. # CWD - change working directory 更改目录

  29. # DELE - delete a remote file 删除文件

  30. # LIST - list remote files 列目录

  31. # MDTM - return the modification time of a file 返回文件的更新时间

  32. # MKD - make a remote directory 新建文件夹

  33. # NLST - name list of remote directory

  34. # PASS - send password

  35. # PASV - enter passive mode

  36. # PORT - open a data port 打开一个传输端口

  37. # PWD - print working directory 显示当前工作目录

  38. # QUIT - terminate the connection 退出

  39. # RETR - retrieve a remote file 下载文件

  40. # RMD - remove a remote directory

  41. # RNFR - rename from

  42. # RNTO - rename to

  43. # SITE - site-specific commands

  44. # SIZE - return the size of a file 返回文件大小

  45. # STOR - store a file on the remote host 上传文件

  46. # TYPE - set transfer type

  47. # USER - send username

  48. # less common commands:

  49. # ACCT* - send account information

  50. # APPE - append to a remote file

  51. # CDUP - CWD to the parent of the current directory

  52. # HELP - return help on using the server

  53. # MODE - set transfer mode

  54. # NOOP - do nothing

  55. # REIN* - reinitialize the connection

  56. # STAT - return server status

  57. # STOU - store a file uniquely

  58. # STRU - set file transfer structure

  59. # SYST - return system type


点击(此处)折叠或打开

  1. [root@vm-nginx01 ~]# cat /etc/vsftpd/vsftpd.conf
  2. anonymous_enable=NO
  3. local_enable=YES
  4. write_enable=YES
  5. local_umask=002
  6. dirmessage_enable=YES
  7. xferlog_enable=YES
  8. connect_from_port_20=YES
  9. xferlog_std_format=YES

  10. listen_port=3332
  11. listen=YES

  12. pam_service_name=vsftpd
  13. userlist_enable=YES
  14. tcp_wrappers=YES

  15. anon_upload_enable=NO
  16. anon_mkdir_write_enable=NO
  17. anon_other_write_enable=NO

  18. connect_timeout=60
  19. idle_session_timeout=300

  20. use_localtime=YES

  21. banner_file=/opt/nginxlog/banner.ftp

  22. chroot_local_user=YES
  23. chroot_list_file=/etc/vsFTPd.chroot_list

  24. local_root=/web/website/xiazai
  25. #cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST


点击(此处)折叠或打开

  1. server
  2. {
  3.                listen 80;
  4.                server_name xiazai.man.com;
  5.                root /web/website/xiazai;
  6.                index index.php index.php5 index.htm;
  7.                access_log /opt/nginxlog/applog/xiazai.manzuo.com;
  8.                #error_log /opt/nginxlog/applog/error.jia;
  9.                 charset utf-8;

  10.                 limit_conn perip 10;
  11.                 limit_rate 200k;
  12.                 autoindex on;

  13.         #location ~ .*\.(gif|jpg|jpeg|png|bmp|wma|mp3|swf)$
  14.         location ~ .*\.*$
  15.         {
  16.                 valid_referers none blocked server_names *.manzuo.com;
  17.                 if ($invalid_referer) {return 403;}
  18.                 expires 30d;
  19.         }

  20.     auth_basic "please input username and passwd!";
  21.     auth_basic_user_file /opt/app/nginx/conf/domain/xiazai.auth.conf;

  22. }



阅读(18310) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~