设置匿名登陆的时候,要保证 /var/ftp/ 的所有者 是root,不然会一直提示输入用户名和密码,无法登陆!

上传的权限 local_umask =002

以及 匿名用户 anon_umask=002

这是保证上传的文件可以属性为775,也就是说ftp用户具有读写权限,而匿名用户也具有读的权限。

除此之外要设置 #chown_uploads=YES 这个是关闭的状态。不然前面的umask 不起作用!

另外 anon_other_write_enable=YES 这个选项使匿名用户可以删除建立文件夹改名字等。

参考配置:

  1. # Example config file /etc/vsftpd/vsftpd.conf
  2. #
  3. # The default compiled in settings are fairly paranoid. This sample file
  4. # loosens things up a bit, to make the ftp daemon more usable.
  5. # Please see vsftpd.conf. for all compiled in defaults.
  6. #
  7. # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
  8. # Please read the vsftpd.conf. manual page to get a full idea of vsftpd's
  9. # capabilities.
  10. #
  11. # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
  12. anonymous_enable=YES
  13. anon_mkdir_write_enable=YES
  14. anon_other_write_enable=YES
  15. #
  16. # Uncomment this to allow local users to log in.
  17. # When SELinux is enforcing check for SE bool ftp_home_dir
  18. local_enable=YES
  19. #
  20. # Uncomment this to enable any form of FTP write command.
  21. write_enable=YES
  22. #
  23. # Default umask for local users is . You may wish to change this to ,
  24. # if your users expect that ( is used by most other ftpd's)
  25. local_umask=
  26. anon_umask=
  27. #
  28. # Uncomment this to allow the anonymous FTP user to upload files. This only
  29. # has an effect if the above global write enable is activated. Also, you will
  30. # obviously need to create a directory writable by the FTP user.
  31. # When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
  32. anon_upload_enable=YES
  33. #
  34. # Uncomment this if you want the anonymous FTP user to be able to create
  35. # new directories.
  36. anon_mkdir_write_enable=YES
  37. #file_open_mode=
  38. #
  39. # Activate directory messages - messages given to remote users when they
  40. # go into a certain directory.
  41. dirmessage_enable=YES
  42. #
  43. # Activate logging of uploads/downloads.
  44. xferlog_enable=YES
  45. #
  46. # Make sure PORT transfer connections originate from port (ftp-data).
  47. connect_from_port_20=YES
  48. #
  49. # If you want, you can arrange for uploaded anonymous files to be owned by
  50. # a different user. Note! Using "root" for uploaded files is not
  51. # recommended!
  52. #chown_uploads=YES
  53. #chown_username=ftp
  54. #
  55. # You may override where the log file goes if you like. The default is shown
  56. # below.
  57. #xferlog_file=/var/log/xferlog
  58. #
  59. # If you want, you can have your log file in standard ftpd xferlog format.
  60. # Note that the default log file location is /var/log/xferlog in this case.
  61. xferlog_std_format=YES
  62. #
  63. # You may change the default value for timing out an idle session.
  64. #idle_session_timeout=
  65. #
  66. # You may change the default value for timing out a data connection.
  67. #data_connection_timeout=
  68. #
  69. # It is recommended that you define on your system a unique user which the
  70. # ftp server can use as a totally isolated and unprivileged user.
  71. #nopriv_user=ftpsecure
  72. #
  73. # Enable this and the server will recognise asynchronous ABOR requests. Not
  74. # recommended for security (the code is non-trivial). Not enabling it,
  75. # however, may confuse older FTP clients.
  76. #async_abor_enable=YES
  77. #
  78. # By default the server will pretend to allow ASCII mode but in fact ignore
  79. # the request. Turn on the below options to have the server actually do ASCII
  80. # mangling on files when in ASCII mode.
  81. # Beware that on some FTP servers, ASCII support allows a denial of service
  82. # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
  83. # predicted this attack and has always been safe, reporting the size of the
  84. # raw file.
  85. # ASCII mangling is a horrible feature of the protocol.
  86. #ascii_upload_enable=YES
  87. #ascii_download_enable=YES
  88. #
  89. # You may fully customise the login banner string:
  90. #ftpd_banner=Welcome to blah FTP service.
  91. #
  92. # You may specify a file of disallowed anonymous e-mail addresses. Apparently
  93. # useful for combatting certain DoS attacks.
  94. #deny_email_enable=YES
  95. # (default follows)
  96. #banned_email_file=/etc/vsftpd/banned_emails
  97. #
  98. # You may specify an explicit list of local users to chroot() to their home
  99. # directory. If chroot_local_user is YES, then this list becomes a list of
  100. # users to NOT chroot().
  101. # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
  102. # the user does not have write access to the top level directory within the
  103. # chroot)
  104. #chroot_local_user=YES
  105. #chroot_list_enable=YES
  106. # (default follows)
  107. #chroot_list_file=/etc/vsftpd/chroot_list
  108. #
  109. # You may activate the "-R" option to the builtin ls. This is disabled by
  110. # default to avoid remote users being able to cause excessive I/O on large
  111. # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
  112. # the presence of the "-R" option, so there is a strong case for enabling it.
  113. #ls_recurse_enable=YES
  114. #
  115. # When "listen" directive is enabled, vsftpd runs in standalone mode and
  116. # listens on IPv4 sockets. This directive cannot be used in conjunction
  117. # with the listen_ipv6 directive.
  118. listen=YES
  119. #
  120. # This directive enables listening on IPv6 sockets. By default, listening
  121. # on the IPv6 "any" address (::) will accept connections from both IPv6
  122. # and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
  123. # sockets. If you want that (perhaps because you want to listen on specific
  124. # addresses) then you must run two copies of vsftpd with two configuration
  125. # files.
  126. # Make sure, that one of the listen options is commented !!
  127. listen_ipv6=NO
  128.  
  129. pam_service_name=vsftpd
  130. userlist_enable=YES
  131. tcp_wrappers=YES

英文配置手册在这里:https://linux.die.net/man/5/vsftpd.conf

vsftp配置遇到的一些问题的更多相关文章

  1. Vsftp的PASV mode(被动模式传送)和Port模式及 Linux下VsFTP配置全方案

    什么叫做PASV mode(被动模式传送)?他是如何工作的? FTP的连接一般是有两个连接的,一个是客户程和服务器传输命令的,另一个是数据传送的连接.FTP服务程序一般会支持两种不同的模式,一种是Po ...

  2. vsftp配置日志及其启用本地时间

    vsftp配置日志及其启用本地时间 1. 启用vsftp日志 xferlog_enable=YES xferlog_std_format=YES xferlog_file=/var/log/xferl ...

  3. Ubuntu14.04(nginx+php+mysql+vsftp)配置安装流程

    Ubuntu14.04(nginx+php+mysql+vsftp)配置安装流程 1.先切换到root用户 sudo  su 2.更新软件源 apt update apt-get upgrade 3. ...

  4. vsftp 配置

    安装和基本配置网上很多文章,但他们的最终效果不是我想要的: 我想要的是,ftp上传的文件用户可以通过apache的http服务访问,也就是ftp上传的文件可以通过浏览器访问,并且可以通过ftp客户端修 ...

  5. centos7.0 vsftp配置

    7.0版本 1.安装 yum -y install vsftpd 2.配置 vi /etc/vsftpd/vsftpd.conf anonymous_enable=NO //设定不允许匿名访问 loc ...

  6. VSFTP 配置虚拟用户

    虚拟用户的特点是只能访问服务器为其提供的FTP服务,而不能访问系统的其它资源.所以,如果想让用户对FTP服务器站内具有写权限,但又不允许访问系统其它资源,可以使用虚拟用户来提高系统的安全性. 在VSF ...

  7. vsftp配置

    网上很多,但我还是想再整理一份属于自己的 1.vsftp简介 vsftp提供三种登陆方式:.匿名登录 .本地用户登录 .虚拟用户登录 vsftpd的特点:.较高的安全性需求 .带宽的限制 .创建支持虚 ...

  8. LINUX VSFTP配置及安装

    ------------------转载:亲身实践,确实好用(http://www.cnblogs.com/jack-Star/p/4089547.html) 1.VSFTP简介 VSFTP是一个基于 ...

  9. linux vsftp配置

    1.rpm -q ftp 查看是否安装ftp服务器 2.yum install vsftp 安装ftp服务器 3.修改配置文件/etc/vsftpd 下面的 ftpusers和user_list,这两 ...

  10. Linux vsftp配置本地用户

    主要讲的是配置本地用户, ftp现在用的也少了,一般都用ssh和svn 1. 安装ftp  yum -y install vsftpd 2. 配置 /etc/vsftpd/vsftpd.conf # ...

随机推荐

  1. nginx 源码编译 用OPENSSL源码 开启 SSL

    ./configure --prefix=/usr/local/nginx --with-openssl=/home/uniqs/thirdparty/openssl/openssl-1.1.1d - ...

  2. Magicodes.IE在Docker中使用

    Magicodes.IE在Docker中使用 更新日志 2019.02.13 [Nuget]版本更新到2.0.2 [导入]修复单列导入的Bug,单元测试"OneColumnImporter_ ...

  3. WeChall_Training: Crypto - Caesar I (Crypto, Training)

    As on most challenge sites, there are some beginner cryptos, and often you get started with the good ...

  4. Codeforces_712_B

    http://codeforces.com/problemset/problem/712/B 水,判断奇偶即可. #include<iostream> #include<string ...

  5. HDU 6274 Master of Sequence (暴力+下整除)

    题意 两个1e5的数组a,b,定义\(S(t)=\left \lfloor \frac{t-b_i}{a_i} \right \rfloor\),有三个操作 1 x y:将\(a[x]\)变为\(y\ ...

  6. Codeforces 1138B Circus (构造方程+暴力)

    题意: 给你两个01串,要你选n/2个位置,使得选的位置在s1中"1"的数量等于未选的s2中"1"的数量 n<=5000,1s 思路: 设两个串中出现&q ...

  7. 全网一定不是最好懂的C++线性筛素数

    Part 0:概念 先给几个概念(很重要): 合数:如果\(xy=z\text{且}x,y\text{为正整数}\),我们就说\(x,y\text{是}z\text{的合数}\) 素数:如果数\(a\ ...

  8. java架构之路-(微服务专题)feign的基本使用和nacos的配置中心

    上次回归: 上次我们说了ribbon的基本使用,包括里面的内部算法,算法的细粒度配置,还有我们自己如何实现我们自己的算法,主要还是一些基本使用的知识,还不会使用ribbon的小伙伴可以回去看一下上一篇 ...

  9. javascript json语句 与 js语句的互转

    //var data = "weihexin" //var data = ["weihexin", 1] var data = {name:"weih ...

  10. DeBug Python神级工具PySnooper

    安装 pip3 install pysnooper import pysnooper @pysnooper.snoop() def number_to_bits(number): if number: ...