ubuntu 12.04.2创建ftp服务

本文详细介绍了如何在Linux环境下安装、配置并启动vsftpd FTP服务器,包括设置匿名用户权限、本地用户登录、文件上传下载等功能,并提供了解决常见问题的方法。

1. sudo apt-get install vsftpd

2.configure /etc/vsftpd.conf,the content is as follows:

 

# 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
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# 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.
#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=sibonac
#
# 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 Prelude 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=NO
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
#
# 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/private/vsftpd.pem

 

3.useradd -d /home/smith -s /usr/sbin/nologin -g ftp

4.cd /home

5.mkdir smith

6.sudo service vsftpd restart

 

Note:

1.local_enable=YES  allow "smith" user to login.

2.anonymous_enable=NO disallow "ftp" default annoymous user to login.

3.if you find the info "longin incorrect",but you can confirm the passwrd and user are both correct,please do the followings:

  open /etc/pam.d/vsftpd,comment on the two line starting from "auth",and save,then restarting vsftpd service.

3.if you connect server, screen shows "the ftp server is only for annoymous",the main reason is loca_enable=NO,just change to YES to solve it.

4.if you use windows ftp client to connect vsftpd,after you successfully login to server,but when you type "ls" or "dri" command,screen promt you use "PASV" mode,please

  check your client windows firewall settings whether is allowed,if allowed,please disabled,becuase windows ftp tool can't support PASV mode,only supporting PORT mode,

  if you open firewall,it keep client from reading on server.Another solution is you can use the ftp client tool supporting PASV mode,such as Filezilla client.

 

01、数据简介 出口韧性是地级市在面对外部震荡和压力时,能够承受并迅速适应、应对变化的能力。这种能力体现在地级市经济结构的灵活性、创新能力和竞争力,以及地方政府的政策支持和产业调整能力等多个方面。 城市出口韧性对于城市的经济发展、就业稳定、国际贸易地位以及风险抵御能力等方面都具有重要影响。因此,城市应加强出口韧性的建设,提高应对外部冲击的能力,以推动其经济的可持续发展。 数据名称:地级市-城市出口韧性数据 数据年份:2011-2022年 02、相关数据 代码 年份 地区 城市 省份 城市出口韧性 距离港口的最近距离 最终进口额_百万人民币2 最终出口额_百万人民币2 人均道路面积2 年末金融机构各项贷款余额万元2 地区生产总值万元2 科学支出万元2 地方财政一般预算内支出万元2 城镇居民人均可支配收入元2 固定资产投资2 实际使用外商投资额百万美元2 城镇化率2 外贸依存度 出口贸易 年平均汇率 实际使用外商投资额百万人民币2 外资依存度 金融发展水平 财政投资力度 科学技术水平 出口偏离度 x_地区生产总值万元2 x_城镇化率2 x_人均道路面积2 x_外贸依存度 x_出口贸易 x_出口偏离度 x_金融发展水平 x_城镇居民人均可支配收入元2 x_财政投资力度 x_科学技术水平 x_距离港口的最近距离 x_外资依存度 地区生产总值万元2_sum y_地区生产总值万元2 城镇化率2_sum y_城镇化率2 人均道路面积2_sum y_人均道路面积2 外贸依存度_sum y_外贸依存度 出口贸易_sum y_出口贸易 出口偏离度_sum y_出口偏离度 金融发展水平_sum y_金融发展水平 城镇居民人均可支配收入元2_sum y_城镇居民人均可支配收入元2 财政投资力度_sum y_财政投资力度 科学技术水平_sum y_科学技术水平
内容概要:本文档详细介绍了一个基于Matlab实现的无人机空中通信仿真资源包,系统涵盖了无人机通信、三维路径规划、状态估计与多机协同等多个核心技术模块的仿真代码与案例研究。内容聚焦于无人机在复杂环境下的三维路径规划(如基于遗传算法GA、粒子群算法PSO、动态窗口法DWA等)、无人机姿态与轨迹的状态估计算法(如扩展卡尔曼滤波器EKF、UKF、不变扩展卡尔曼滤波IEKF、粒子滤波PF等),以及无人机通信链路建模与优化,并融合智能优化算法对系统性能进行提升。此外,资源包还拓展至微电网优化、MIMO检测、图像融合、信号处理等相关科研领域,构建了一个以无人机技术为核心、多学科交叉融合的综合性仿真研究体系。; 适合人群:具备一定Matlab编程能力与控制系统基础知识,从事无人机系统设计、无线通信、自动化控制、智能优化算法或相关领域研究的科研人员、高校研究生及工程技术人员。; 使用场景及目标:①展无人机通信系统建模与性能仿真分析;②实现复杂动态环境中无人机三维路径规划与实时避障;③研究基于多源传感器融合的无人机导航与状态估计方法;④结合智能优化算法提升无人机任务执行效率与系统鲁棒性; 阅读建议:建议读者依据资源包提供的模块化结构系统学习,优先掌握Matlab/Simulink基本仿真技能,重点研读路径规划与状态估计部分的算法实现与代码细节,并通过实际调试与二次发加深对无人机系统集成与优化策略的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值