日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

配置ftp服务器亲测可用

發布時間:2025/3/15 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 配置ftp服务器亲测可用 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

環境ubuntu16.04

安裝vsftpd軟件

sudo apt-get install vsftpd

?

配置vsftpd.conf文件

進入etc目錄并備份配置文件

cd /etc/

cp vsftpd.conf? ~/vsftpd.conf.bak

進入編輯

sudo vi vsftpd.conf

確保

Listen=YES

?anonymous_enable=NO ?

local_enable=YES ?

write_enable=YES前面的#號

使用ipv4的直接注釋掉 listen_ipv6=YES

或者直接復制如下文件,替換自己的vsftpd.conf文件

# 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 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 #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 pasv_min_port=10060 pasv_max_port=10090# # #

在文末加上,將為vsftpd被動模式的端口設置范圍

pasv_min_port=10060
pasv_max_port=10090

保存退出

添加FTP用戶

sudo useradd -d /home/ubuntu/ftp -s /bin/bash username

執行如下語句設置密碼(username為用戶名)

sudo passwd username

啟動ftp服務

sudo service vsftpd start

總結

以上是生活随笔為你收集整理的配置ftp服务器亲测可用的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 亚洲性色av | 99一区二区 | a级国产视频 | 少妇激情在线 | 一区二区手机在线 | 一区二区手机在线 | 国产免费av在线 | 亚洲永久精品一区二区 | 免费无码毛片一区二三区 | av最新在线 | 这里只有精品22 | 草久在线 | 国产成人自拍在线 | 不卡影院| 禁漫天堂黄漫画无遮挡观看 | 铠甲勇士猎铠 | av电影在线观看网址 | 在线不卡免费av | 一级欧美视频 | 日韩一区二区三区在线免费观看 | 亚洲精品国产精品国自产网站按摩 | 亚洲精品欧美日韩 | 九九九九精品九九九九 | 欧美性猛交xxxx | 艳妇乳肉豪妇荡乳av无码福利 | 97国产精品视频人人做人人爱 | 可以免费看的毛片 | 捆绑裸体绳奴bdsm亚洲 | 欧美狠狠操 | 长篇高h肉爽文丝袜 | 国产91美女视频 | 伊人22 | 五月婷婷视频在线 | 日本成人三级电影 | 成人精品一区二区 | 亚洲精品高潮久久久久久久 | 精品人成 | 97免费人妻无码视频 | 依人综合网| 欧美一区二区视频 | 日本wwwxxxx | 精品黑人一区二区三区久久 | 国语精品 | 国产第1页| 欧美精品在线一区 | 黄页网站视频 | 香蕉久久夜色 | 中文字幕欧美在线 | 在线观看的av网址 | 91久久精品国产91久久性色tv | 二十四小时在线更新观看 | 欧美国产一区二区三区 | 高清免费视频日本 | 致单身男女免费观看完整版 | 日本大乳奶做爰 | 日韩中文字幕av | 爱吃波客今天最新视频 | 亚洲第二色 | 风间由美av| 色女人网| 久久94 | 蜜桃视频在线观看污 | 少妇精品无码一区二区免费视频 | 第一页综合 | 亚洲福利午夜 | 性色av浪潮 | 欧美人喂奶吃大乳 | 九色首页 | 国产尻逼 | 插插插日日日 | 久久久999国产精品 天堂av中文在线 | 亚洲一区二区中文字幕 | 免费av日韩 | 一级片在线免费观看视频 | 国产婷婷一区二区三区久久 | 亚洲三级网 | 99久久精品无免国产免费 | 爽好多水快深点欧美视频 | 色婷婷av一区二区三区软件 | 色欲色香天天天综合网www | 天天天天色| 在线观看亚洲专区 | 噜噜视频| 粉嫩小箩莉奶水四溅在线观看 | 日本午夜精品 | 日韩av动漫| 色九九| 一级全黄裸体免费观看视频 | 国产精品一区二区免费视频 | 在线播放不卡av | 色九九视频 | 91av一区| 免费福利小视频 | 久久精品伊人 | 91色片| 成人在线观看你懂的 | 国产123区在线观看 91国产一区二区 | 国产99久久久| 91蝌蚪91九色 |