`
yefeishan
  • 浏览: 108682 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论

Linux平台安装vsftpd服务器

阅读更多
  • 安装:#>rpm -ivh vsftpd.rpm,默认安装在/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
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
#
# 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(设置所有用户都定位到自己的home目录下面,不能进到父目录里面,如果这个地方设置为YES,chroot_list_enable=YES的话,就只有chroot_list文件里面的用户可以进到父目录)
#chroot_list_enable=NO
# (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 whith 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

 

userlist_enable=YES(设置只有列表里面的用户可以登录)
userlist_deny=NO(设置是否显示登录框)
userlist_file=/etc/vsftpd/vsftpd.user_list(用户文件,一行一个用户,可以是系统用户)

 

local_root=/home/gomye/apache-tomcat-6.0.32(所有ftp用户的根目录)

  • 在/etc/vsftpd目录中新建文件,并添加用户,即写入一行,gomye(这是系统中的用户,)
  • 重启#>service vsftpd restart,这个时候通过客户端访问,有可能会出现500错误,或者没有任何显示也不报错,这样的情况要考虑是否是Selinux的原因,需要关闭,执行#>setenforce 0关闭
  • 参考网站:http://bevisoft.iteye.com/blog/423751

 

 

注意:

  • 如果有多个用户,且多个用户的根目录都不一样,则需要另外配置,
  • 1.在vsftpd.conf文件里面加入一项:
  • user_config_dir=/etc/vsftpd/user_conf(设置多用户虚拟目录的配置文件存放位置)

  • 然后在/etc/vsftpd/目录下面再建一个user_conf的目录

  • 在里面新建一个gomye的文件(记住这个文件的名字要跟登录ftp用户的名字一样)

  • 在gomye文件里面输入一行:

    local_root=/opt(把gomye用户的根目录定位到/opt下面)

     

分享到:
评论

相关推荐

    linux离线安装vsftpd包.zip

    Linux系统中的VSFTPD(Very Secure FTP Daemon)是一款流行的FTP服务器软件,因其高度的安全性和配置灵活性而被广泛使用。在没有网络连接的情况下,通过离线安装包进行VSFTPD的安装是一个常见需求,特别是对于那些...

    linux下安装vsftpd服务

    在 Linux 系统中,安装 vsftpd 服务可以提供 FTP 服务器功能,vsftpd 是目前 Linux 最好的 FTP 服务器工具之一,其中的 vs 就是“Very Secure”的缩写,表明该工具的最大优点就是安全。除此之外,vsftpd 还具有体积...

    在armlinux 下架设 vsftpd 服务器(文档加源码)详细

    在ARMLINUX环境下搭建VSFTPD服务器是一项关键的系统管理任务,主要用于实现文件传输服务。本文将深入探讨这一过程,并附带源码和设计文档,确保读者能够详细理解每一步骤。 首先,VSFTPD(Very Secure FTP Daemon)...

    Linux环境下vsftpd服务器的搭建

    Linux环境下vsftpd服务器的搭建

    Linux 源代码 编译安装vsftpd-2.3.4

    在Linux系统中,为了搭建一个安全且可靠的FTP服务器,许多人选择使用vsftpd(Very Secure FTP Daemon)。本文将深入探讨如何编译安装vsftpd-2.3.4这一特定版本,以及如何进行配置,以确保您的FTP服务既高效又安全。 ...

    linux环境下安装vsftpd

    在Linux环境中,VSFTPD(Very Secure FTP Daemon)是一款广泛使用的FTP服务器软件,因其高度的安全性和易用性而备受青睐。下面将详细介绍如何在Linux系统中安装和配置VSFTPD。 首先,确保你的Linux系统已经更新到...

    rehl-linux-Server6搭建vsftpd服务器

    在Red Hat Linux Server 6上搭建VSFTPD服务器是一个常见的任务,这主要涉及到FTP服务器的配置,以便提供安全且可控的文件传输服务。VSFTPD(Very Secure FTP Daemon)是一个流行的开源FTP服务器软件,因其安全性而...

    centos7上安装与卸载vsftpd服务器

    vsftpd (Very Secure FTP Daemon) 是 Linux 系统上一款广泛使用的文件传输协议 (FTP) 服务器软件。它以轻量级、高效能著称,尤其适合在资源有限的环境下提供稳定的文件传输服务。vsftpd 的优势在于它能够提供高度的...

    linux安装vsftpd配置FTP服务器

    ### Linux安装vsftpd配置FTP服务器详解 在Linux系统中,vsftpd是配置FTP服务的常用工具之一,因其安全性和稳定性而广受好评。本文将深入解析如何在Linux环境中安装与配置vsftpd,搭建FTP服务器,以及进行必要的安全...

    vsftpd安装步骤教程

    Vsftpd 是一个免费的开源 FTP 服务器软件,广泛应用于 Linux 操作系统中。本文将详细介绍在 CentOS 7 上安装和配置 Vsftpd 服务器的步骤,并解决可能出现的常见错误。 安装 Vsftpd 服务器 1. 删除已安装的 Vsftpd ...

    linux安装vsftpd详细教程

    ### Linux安装VSFTPD详细教程 #### 一、前言 在Linux环境下部署FTP服务器是一项常见且实用的任务,尤其对于需要进行文件传输的场景尤为重要。本文将详细介绍如何在Linux 7系统上安装与配置VSFTPD(Very Secure FTP...

    ubuntu server 安装vsftpd FTP服务器linux服务器应用 电脑资料.doc.docx

    Ubuntu Server 安装 VSFTPD FTP 服务器 Linux 服务器应用电脑资料 安装 VSFTPD FTP 服务器是 Linux 服务器应用电脑资料中的一部分,本文将详细介绍如何在 Ubuntu Server 10.4 上安装 VSFTPD FTP 服务器。 一、安装...

    Ubuntu Linux上安装SSH和Vsftpd的方法

    Ubuntu Linux 上安装 SSH 和 Vsftpd 的方法 在 Ubuntu Linux 中,安装 SSH 和 Vsftpd 是非常重要的步骤,它们分别提供了安全的远程登录和文件传输功能。下面是关于 Ubuntu Linux 上安装 SSH 和 Vsftpd 的详细介绍:...

    安装vsftpd服务器

    【安装vsftpd服务器】 vsftpd(Very Secure ...通过上述步骤,您可以成功地在Linux系统上安装并配置vsftpd服务器,从而提供一个安全且可定制的FTP服务环境。务必根据实际需求调整配置,以确保服务器的安全性和效率。

    Linux编译安装vsftpd服务器(本地用户验证方式)

    Linux vsftpd编译安装和配置允许本地用户登录FTP 1、下载vsftpd源码 wget https://security.appspot.com/downloads/vsftpd-2.3.4.tar.gz 2、编译vsftpd源码 64位的系统编译之前先要执行cp /lib64/libcap.so.1 /lib/...

    Linux离线安装ftp安装包

    这里我们将详细讲解如何利用提供的"vsftpd-2.2.2-24.el6.x86_64.rpm"安装包,在Linux系统中安装FTP服务器。 首先,"vsftpd"是"Very Secure FTP Daemon"的缩写,它是一个开源、免费且安全的FTP服务器软件,适用于...

Global site tag (gtag.js) - Google Analytics