Linux系统服务 6 ---- vsftpd服务的配置文件实现匿名登录上传下载和删除功能

/etc/vsftpd/vsftpd.conf配置文件

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES //可以匿名登录
anon_other_write_enable=YES //可以匿名删除
anon_world_readable_only=NO //匿名登录只看取消
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
anon_umask=022 //匿名登录的默认权限
#
# 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 //匿名登录可以创建文件夹
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# 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_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
时间: 2024-10-11 00:01:38

Linux系统服务 6 ---- vsftpd服务的配置文件实现匿名登录上传下载和删除功能的相关文章

ftp上传下载,ftp服务器在windows系统下,web服务器在linux系统下

问题描述 ftp上传下载,ftp服务器在windows系统下,web服务器在linux系统下 哪位大神知道: ftp服务器在搭建windows系统下,web服务器在部署linux系统下,现java中使用ftpclient实现上传下载时,下载的文件内容是乱码: 之前web服务器也部署在windows系统下正常的,后来迁移到linux系统下出现乱码了啊,中文文件名编码正常. 查ftpclient的源码发现读取ftp服务器上文件的编码格式固定了,无法在外部修改,有试着将读取出来的文件转码各种编码方式,

如何在linux添加一个ftp用户,让其只有上传权限,没有下载权限?

问题描述 如何在linux添加一个ftp用户,让其只有上传权限,没有下载权限? 如何在linux添加一个ftp用户,让其只有上传权限,没有下载权限? 解决方案 首先你要使用一个ftp服务器端,不同的服务器端配置不同. 一般来说上传下载权限都是单独设置的,即分别设置允许上传和禁止下载即可. 参考:http://ming228.blog.51cto.com/421298/112083/ 解决方案二: http://www.cnblogs.com/bienfantaisie/archive/2011/

linux下lftp连接ftp服务器上传下载命令

  linux下lftp连接ftp服务器上传&下载 Java代码 用法: lftp ftp://用户名:密码@IP > 下载目录 mirror DIRNAME [下载整个目录里包含子目录,推荐此命令] 上传目录 mirror -R DIRNAM 下载目录 ... 用法: lftp ftp://用户名:密码@IP > 下载目录 mirror DIRNAME [下载整个目录里包含子目录,推荐此命令] 上传目录 mirror -R DIRNAM 下载目录 方法一 > mget -d D

Linux系统服务 3 FTP服务原理及vsftpd服务配置

1 FTP 1 FTP是一个相当古老并且应用极为广泛的互联网协议,FTP为我们提供了一种可靠的方式在网络上进 行文件共享 2 FTP是一种CS架构的服务,拥有一个服务端和客户端,FTP使用TCP协议作为底层传输协议,提供了 数据传输的可靠性,FTP的标准端口为20,21,20做为数据接口,21为指令接口 3 所有的共享的文件都是放在服务端 2 FTP模式 FTP客户端和服务端连接有两种模式 1 主动模式:指的是假设客户端要向服务端请求文件共享的时候,首先客户端先发送一个请求到服务 的21号端口,

Linux系统服务 5 ---- Vsftpd匿名用户不能下载原因分析及解决

原文出处 Vsftp匿名用户不能下载原因分析及解决    vsftp中的和匿名用户有关的参数  1)主配置文件:/etc/vsftpd/vsftpd.conf -------------------------------------------------- [root@station ~]# cat /etc/vsftpd/vsftpd.conf |grep -v ^# anonymous_enable=YES local_enable=YES write_enable=YES local_

linux学习:CentOS、Mac上SSH的设置以及SceureCRT中的文件上传下载

java项目做好后,最终部署时,通常是通过SecureCRT(或其它终端)连接linux上传war包来进行.学几个基本的linux命令还是必要的. 一.CentOS上的SSH设置 1.1 终端窗口下,以root身份登录,修改hosts.allow,允许用户远程连接vi /etc/hosts.allow按 i 键切换到 insert模式,在最后一行加一句sshd:ALL然后按ESC返回命令模式,然后再按:进行末行模式,最后输入x 保存退出(注:如果保存时,提示文件只读,可以尝试 chmod +w

linux版快盘上传下载shell脚本

安装使用 此脚本适用于大部分bash环境,已经在cygwin,ubuntu14.04,debian,centos6,mac-osx等环境通过测试. 1.依赖项 使用此程序前请确认你的Linux或者Cygwin支持如下命令: curl sed awk basename date grep tr od openssl base64 2.配置 如果你想使用自己的app_key你需要首先注册一个金山快盘账号,然后到这里地址创建一个你自己的应用并把得到的 consumer_key.consumer_sec

Linux系统中使用lftp命令实现FTP上传下载

  适合于 FTP 操作的命令和软件比较多. Linux 下常用的操作命令有 ftp, lftp 和 sftp,图形化界面非常好用的有 FileZilla.不过在服务器命令界面中,我还是觉得lftp使用比较方便,功能也比ftp更加强大.lftp的界面很像Linux的shell,有命令补全.历史记录.允许多个后台任务执行.书签.排队.镜像.断点续传.多进程下载等功能. 登录ftp命令 代码: lftp 用户名:密码@ftp地址:传送端口(默认21) 用法 (1)lftp username:pass

linux中scp命令实现远程上传下载文件/文件夹

命令:scp 不同的Linux之间copy文件常用有3种方法: 第一种就是ftp,也就是其中一台Linux安装ftp Server,这样可以另外一台使用ftp的client程序来进行文件的copy. 第二种方法就是采用samba服务,类似Windows文件copy 的方式来操作,比较简洁方便. 第三种就是利用scp命令来进行文件复制.     scp是有Security的文件copy,基于ssh登录.操作起来比较方便,比如要把当前一个文件copy到远程另外一台主机上,可以如下命令. scp /h