centos vsftpd安装

2023-05-16

1.安装vsftpd

yum install vsftpd 
service vsftpd restart 
vi /etc/vsftpd/vsftpd.conf #配置见最下文
vi /etc/vsftpd/vsftpd.conf chroot_list #配置建最下文
chkconfig vsftpd on

2.添加ftp帐号和目录

useradd -d /home/ftp ftppp 
passwd ftppp

修改指定目录的权限
chown -R ftppp:ftppp  /home/wwwroot

3.端口开启

iptables -I INPUT -p tcp --dport 20 -j ACCEPT
iptables -I INPUT -p tcp --dport 65400:65410 -j ACCEPT

 

# 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=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.
# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
#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
#
# 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/xferlog
#
# 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=60
#
# 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. The vsftpd.conf(5) man page explains
# the behaviour when these options are disabled.
# 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().
# (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
allow_writeable_chroot=YES
#
# 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=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.
# Make sure, that one of the listen options is commented !!
listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
#tcp_wrappers=YES
#操作日志记录
dual_log_enable=YES
vsftpd_log_file=/var/log/vsftpd.log
pasv_min_port=65400
pasv_max_port=65410

[root@localhost vsftpd]# cat  chroot_list 

ftpup
ftppp

 

 

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

centos vsftpd安装 的相关文章

随机推荐

  • Windows Server 2016 重置密码

    问题描述 xff1a 今天上午的时候 xff0c 系统提示我 xff0c 密码过期 xff0c 需要修改密码 xff0c 我上午就没处理 xff0c 等到下午去处理的时候 xff0c 告诉我 xff0c 在登陆前 xff0c 必须修改用户的
  • 城市列表第三方集成

    城市列表首先要导入两个依赖 xff0c 根据信息放入正确的位置 1 在本app的gradle里面 compile 39 com github andyoom citypicker v1 0 4 39 2 在项目的工作空间build grad
  • Srpingboot+Redis redisTemplate 报空指针异常(注入为NULL)

    今天整合Springboot 43 redis做测试的时候发现了 redisTemplate报空指针错误 原因是注入时候redisTemplate就是null 查了一下后面发现是容器没有启动 单纯的测试是无法注入的 要在测试类上加上 spa
  • KDD 2020 推荐系统论文一览

    作者 学派 链接 https zhuanlan zhihu com p 161705748 编辑 深度传送门 KDD是推荐领域一个顶级的国际会议 本次接收的论文按照推荐系统应用场景可以大致划分为 xff1a CTR预估 TopN推荐 对话式
  • android Button按下及抬起监听事件

    首先我们在 布局中 xff0c 写入Button按钮 lt xml version 61 34 1 0 34 encoding 61 34 utf 8 34 gt lt LinearLayout xmlns android 61 34 ht
  • JZVIdeoPlayer(节操视频播放)

    比如jiecao的视频播放 依赖一个是视频 xff0c picasso 图片加载框架 compile 39 cn jzvd jiaozivideoplayer 6 0 0 39 compile 39 com squareup picasso
  • Android Apk编译的apk安装失败解决

    一 xff1a 如果直接拷贝到手机进行安装 提示安装失败 xff0c 解决有两种 第一 xff1a 在我们项目中的 gradle properties 文件中加入 xff0c 下面的那句 android injected testOnly
  • Android APP第三方支付流程

    手机APP 支付宝接入 1 开发前准备 xff1a 申请一个通过实名认证的企业支付宝账号 下载SDK开发包 提供APP apk以备审核 xff0c 审核通过后即可进行代码集成 2 流程 流程图 xff1a 流程解释 xff1a app携带支
  • Android介绍如何生成keystore 文件并使用

    cmd下 进入到jdk的bin目录 xff0c 这样的话 xff0c android keystore文件就会生成在这个目录下 签名的时候我们需要这个文件 C Program Files Java jdk1 7 0 01 bin gt ke
  • android代码APK混淆

    实际的产品研发中为了防止自己的劳动成果被别人窃取 xff0c 混淆代码能有效防止apk文件被反编译 xff0c 进而查看源代码 说来惭愧 xff0c 作为互联网创业公司的我们也确实对竞品Apk反编译研究过 xff0c 如果Apk混淆之后确实
  • android资源文件混淆

    前面一篇文章我们说过Apk的混淆 xff0c 除了源代码的混淆 xff0c 还有资源文件的混淆 微信推出的apk资源混淆方案 xff0c 该方案的具体原理课参见 xff1a 安装包立减1M 微信Android资源混淆打包工具 微信资源混淆工
  • WebView使用

    https www cnblogs com xunzhi p 6023190 html span class hljs keyword public span span class hljs class span class hljs ke
  • 最新研究:AI已可诊断50种眼疾,1.2秒内确认神经系统疾病

    本文由人工智能观察编译 译者 xff1a Sandy 近年来 xff0c 人工智能技术与医疗健康领域的融合不断加深 xff0c 且在科技巨头与资本巨头积极布局的努力下 xff0c 智能医疗正在不断取得新的突破 而根据 自然医学 xff08
  • stm32 fsmc 功能讲解

    LCD有如下控制线 xff1a CS xff1a Chip Select 片选 xff0c 低电平有效 RS xff1a Register Select 寄存器选择 WR xff1a Write 写信号 xff0c 低电平有效 RD xff
  • go语言基础之面向接口编程示例

    span class token keyword package span main span class token keyword import span span class token punctuation span span c
  • ZynqMP SOC 启动Linux遇到TF卡只读(RO)报错

    如果TF卡作为root启动Linux遇到如下错误 xff1a mmcblk0 mmc0 13ab SE128 115 GiB ro VFS Cannot open root device 34 mmcblk0p2 34 or unknown
  • mmc0: error -84 whilst initialising SD card

    玩zynqMP的板子上的SOC xff0c TF作为root启动petalinux系统 xff0c 碰到如下报错 xff1a error 84 whilst initialising SD card 查询Kernel代码中的sd c也没有看
  • .gradle文件夹下没有gradle.properties

    前言 可直接跳过此段到解决方法 前两天刚配置好Android的环境 xff0c 创建了一个Google的sample 但是在构建的过程中就出了问题 Unable to resolve dependency for 39 app 64 deb
  • eclipse编写web.xml中出现The word '...' is not correctly spelled

    为什么会这样呢 xff1f 因为eclipse中设置了拼写检查 xff0c 解决方法 window gt preferences gt 输入spelling xff0c 将右面的enable spelling checking复选框中的勾去
  • centos vsftpd安装

    1 安装vsftpd yum install vsftpd service vsftpd restart vi etc vsftpd vsftpd conf 配置见最下文 vi etc vsftpd vsftpd conf chroot l