Ubuntu离线安装Vsftp

这篇具有很好参考价值的文章主要介绍了Ubuntu离线安装Vsftp。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

 这是资源包:(14条消息) unbuntu-vsftp.server-Linux文档类资源-CSDN文库

一、安装vsftp

        将包解压,然后在解压报的目录下一键安装

dpkg -i *.deb // 安装所有
systemctl status vsftpd #查看运行状态
systemctl restart vsftpd  #重新启动vsftp

二、修改配置文件

        这是我的配置文件,如果第一次配置建议直接照搬

# 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=YES
#
# 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
local_root=/servicedata
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/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

allow_writeable_chroot=YES
#
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
#utf8_filesystem=YES

        需要在etc目录下建立一个文件 chroot_list,该文件内存放的是可以访问vsftp服务器的用户名

local_root=/servicedata 该配置决定了用户可以访问哪个文件夹,我设置的是/servicedata目录

Ubuntu离线安装Vsftp

 三、创建访问的用户

        在vsftp中没有用户是访问不了的,据说有匿名访问,但是为了服务器安全,没有设置相关的配置。

        创建一个访问服务器的用户

useradd -m -g viewer viewer  创建组用户

passwd 用户名  //设置用户密码

        将创建的用户写入chroot_list文件中,也可以将本地用户放进去。

Ubuntu离线安装Vsftp

         最后重启:systemctl restart vsftpd

四、测试

在另一台电脑上WIN+R打开命令板

Ubuntu离线安装Vsftp

输入用户名和密码

Ubuntu离线安装Vsftp

 出现230 login successful 表示成功登录

Ubuntu离线安装Vsftp

 输入ls可以看到当前文件目录下的所有资源

使用get可以获取某文件

Ubuntu离线安装Vsftp

 文章来源地址https://www.toymoban.com/news/detail-466821.html

到了这里,关于Ubuntu离线安装Vsftp的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • ubuntu离线安装包下载和安装

    方法1: 方法2: 比如需要下载 lm-sensors, 在 search栏中添加搜索 找到ubuntu20.04 对应的deb包,点击进去,找到 Download -- BinaryPackage 复制粘贴 对应的url到浏览器即可完成下载 http://archive.ubuntu.com/ubuntu/pool/universe/l/lm-sensors/lm-sensors_3.6.0-2ubuntu1_amd64.deb

    2024年02月20日
    浏览(34)
  • Ubuntu 离线安装Mysql

    下载Mysql安装包 下载地址:MySQL :: Download MySQL Community Server 2.1解压安装包         创建目录 mkdir  mysql         解压到创建的目录下 tar -xvf mysql-server_8.0.29-1ubuntu21.10_amd64.deb-bundle.tar -C /home/mysql/ 2.2增加执行权限 chmod +x *.deb 2.3安装  安装依赖包 sudo dpkg -i libaio1_0.3.112-9_amd64.deb  

    2024年02月15日
    浏览(45)
  • Ubuntu:离线安装docker

    简介 :在 Ubuntu 上离线安装 Docker 需要事先在有网络连接的设备上下载 Docker 安装包及其依赖项,然后将这些文件传输到目标 Ubuntu 设备上进行安装。 历史攻略: ubuntu卸载docker centos7.6:安装docker 离线安装 Docker 的步骤: 1、在有网络连接的设备上下载 Docker 安装包及依赖项 :

    2024年02月16日
    浏览(48)
  • Ubuntu离线安装Telnet服务

    通过ssh上传telnet包,下载地址:telnet-0.17-41.2build1-amd64资源-CSDN文库 解压telnet包: 安装telnet服务:  安装完毕,测试telnet服务:  出现这个说明telnet服务安装成功 按住ctrl 键输入 ] 进行下一步,可以对连接的服务器进行操作

    2024年02月11日
    浏览(37)
  • RHEL 9配置vsftp服务的安装及部署

    FTP(File Transfer Protocol)是一种用于在计算机之间传输文件的协议。它允许用户通过网络连接到远程服务器,并在本地计算机和服务器之间传输文件。 FTP服务器提供了存储和管理文件的功能,并允许用户通过FTP客户端连接到服务器来上传、下载、删除和重命名文件。FTP服务器

    2024年04月16日
    浏览(45)
  • Backend - Docker 离线安装(Ubuntu)

    目录 一、安装 docker 1. 下载docker离线包 2. 用Winscp打开桌面 3. 打开putty 4. 解压 5. 授权docker文件目录为可执行文件 6. 将docker文件夹复制到 /usr/bin 目录下 7. 查看版本 二、docker-compose 1. 下载docker-compose离线包 2.将下载好的离线包拖拽到服务器上 3. ls查看是否有x86_64文件包 4. 将

    2024年04月09日
    浏览(39)
  • Ubuntu离线安装g++、locales

    要在Ubuntu上离线安装g++,你需要在有网络连接的机器上下载g++和它的依赖,然后将它们传输到离线的Ubuntu机器上进行安装。以下是步骤和示例命令: 确保你在离线机器上有足够的权限来执行上述命令。如果网络连接的机器是Ubuntu Server,那么你可以直接使用apt-offline命令。如果

    2024年04月26日
    浏览(36)
  • Ubuntu20下的Docker的离线安装

    在实际项目中,经常遇到一些纯内网的环境,对于项目的部署来说就需要做到离线安装Docker,然后把项目的外网镜像从拷贝到内网进行部署。下面主要记录下如何离线安装Docker 1.下载Docker的离线安装包 Docker的离线安装需要用到containerd.io ,docker-ce-cli,docker-ce,从下面的网址下

    2024年02月01日
    浏览(38)
  • (笔记)ubuntu离线更新、安装软件包

    不联网的技术部,令人头痛。 1.在可以联网的ubuntu主机上更新缓存相关依赖包 执行sudo apt-get -d update  (-d为下载模式、不安装) 2.缓存软件包(如vlc) 执行sudo apt-get -d install vlc   (如果已经安装,且缓存deb文件被清理掉了。可通过命令sudo apt-get remove --purge vlc进行卸载,再次下

    2024年02月13日
    浏览(55)
  • Ubuntu openssh-server 离线安装

    经常用到ubunutu 20.04容器,但是没有ssh比较难调试代码,离线环境下安装方法: 安装以下三个软件包,点击openssh下载链接可下载: 1、openssh-client_8.2p1-4_amd64.deb 2、openssh-sftp-server_8.2p1-4_amd64.deb 3、openssh-server_8.2p1-4_amd64.deb 然后执行 正常装完即可。 其余ubuntu版本可以自己搜一下

    2024年02月01日
    浏览(40)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包