/etc/vsftpd.conf配置(ftp上传)

# Example config file /etc/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.
#
#
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=NO
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=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
#
# 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
#
# If enabled, vsftpd will display directory listings with the time
# in  your  local  time  zone.  The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
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
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
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 restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# 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().
# (Warning! chroot‘ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# 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
#
# Customization
#
# Some of vsftpd‘s settings don‘t fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty.  Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO

#
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
utf8_filesystem=YES
local_root=/var/ftp

时间: 2025-01-11 15:59:06

/etc/vsftpd.conf配置(ftp上传)的相关文章

mysql自动备份数据库,同时ftp上传到指定服务器(scp远程获取本地备份)

最近要把服务器托管到电信机房,所以要对数据库进行备份,同时要把备份ftp上传到公司指定服务器. 一.先安装ftp服务 1.查询是否安装vsftpd: rpm -qa |grep vsftpd (rpm的安装:apt-get install rpm) 或者查询当前ftp进程:ps -ef|grep vsftpd ? 或者 ps -ef|grep ftp 2.如果没有就安装yum install vsftpd 3.安装完后看ftp安装目录:ps -ef|grep ftp 发现我的配置文件默认:/et

vsftpd开启日志记录上传、下载、删除,分析xferlog日志

在web服务器上搭建了vsftpd用来上传代码程序,开启日志记录客户端的上传.下载删除等操作: #修改/etc/vsftpd/vsftpd.conf [[email protected] ~]# vim /etc/vsftpd/vsftpd.conf anonymous_enable=NO anon_root=/ftpanon local_enable=YES write_enable=YES local_umask=022 dirmessage_enable=YES dual_log_enab

UEditor FTP上传

最近在项目中遇到了使用文本编辑器的情况,但是根据项目要求,文本编辑器的图片不能保存在本地服务器上,必须上传到远程文件服务器上,找了众多资料,没有找到答案,最后终于自己反编译了百度的JAR包,完完整整的研究了一次逻辑,终于实现了该功能,这里分享一下.以免后来者枉费时间. 步骤1.在自己的工程中实现一个ActionEnter类 package com.xxxx.ueditor; import com.baidu.ueditor.ConfigManager; import com.baidu.uedi

本地虚拟机中匿名ftp上传文件失败的问题

在10.10.50.230中新建了一个匿名的ftp服务器,结果在10.10.50.241中上传文件时提示: local: README.txt remote: /var/ftp/pub/upload 227 Entering Passive Mode (10,10,50,230,117,8). 553 Could not create file.   由于搭建步骤是完全按照标准文档建立的,vsftp.conf的设置应该没有问题,检查:getsebool -a|grep ftp 发现: allow

PHP使用FTP上传文件到服务器(实战篇)

我们在做开发的过程中,上传文件肯定是避免不了的,平常我们的程序和上传的文件都在一个服务器上,我们也可以使用第三方sdk上传文件,但是文件在第三方服务器上.现在我们使用PHP的ftp功能把文件上传到我们自己的服务器,我使用的linux的服务器,首先确保服务器上配置好ftp,以vsftpd为例. FTP类,此类包含把文件上传.下载.删除和删除ftp服务器目录功能,php版本>=7.0 <?php /** * Created by PhpStorm. * User: 123456 * Date: 2

Java实现FTP上传下载功能

Java FTP客户端工具包很多,在此我选用的Apache的FTPClient.这个包的获取可以通过http://commons.apache.org/net/来获取,我使用的是最新的commons-net-1.4.1.zip.其中包含了众多的java网络编程的工具包,官方文档列举如下: 1.支持网络协议如下: FTP.NNTP. SMTP.POP3.Telnet.TFTP.Finger.Whois.rexec/rcmd/rlogin.Time (rdate) and Daytime.Echo.

再看ftp上传文件

前言 去年在项目中用到ftp上传文件,用FtpWebRequest和FtpWebResponse封装一个帮助类,这个在网上能找到很多,前台使用Uploadify控件,然后在服务器上搭建Ftp服务器,在本地测试程序上传到ftp服务器一点问题都没有,奇怪的是当发布Web和ftp到同一个IIS下,上传文件时程序直接卡死,然后页面卡死,后来我又发现把Web和ftp分开发布在两台机器上问题又得到解决,所以当时放弃了这个方案. 再看ftp上传文件 前几天偶然看到Wolfy写到一个项目总结,其中提到了用Ser

selinux导致ftp上传失败 工作中的真实案例

这是一台squid代理服务器(一台式机,安装的是redhat 5.4 64位操作系统),每天下午4点一台服务器通过ftp上传主机数据库巡检报告到这台代理PC机的一个用户家目录下的xunjian目录下,这台PC再通过发送邮件的方式将巡检报告发给组内成员,进行巡检 此为背景,之前的selinux设置的为Permissive,不料同事中午睡觉的时候,脚这么一碰,将这台代理PC重启了,重启后,连续2天的巡检报告都没有通过邮件收到,赶紧解决吧 1.手动的执行ftp上传动作,报如下错误:553 Could

java FTP上传和下载文件

1 package com.ftp; 2 3 /** 4 * ftp链接常量 5 * 6 */ 7 public class Ftp { 8 9 private String ipAddr;//ip地址 10 11 private Integer port;//端口号 12 13 private String userName;//用户名 14 15 private String pwd;//密码 16 17 private String path;//aaa路径 18 19 public St

SpringMvc + Jsp+ 富文本 kindeditor 进行 图片ftp上传nginx服务器 实现

一:html 原生态的附件上传 二:实现逻辑分析: 1.1.1 需求分析 Common.js 1.绑定事件 2.初始化参数 3.上传图片的url: /pic/upload 4.上图片参数名称: uploadFile 5.返回结果数据类型json 参考文档: http://kindeditor.net/docs/upload.html 返回格式(JSON) 1 //成功时 2 3 { 4 5 "error" : 0, 6 7 "url" : "http://