ubuntu服务器安装proftpd ftp服务器步骤
复制代码
代码如下:
sudo apt-get install proftpd
安装过程中会让选择运行模式:Standalone和Inetd,前者是单一服务器模式,后者是超级服务器模式,
我选的Standalone。
二、配置
复制代码
代码如下:
sudo vim /etc/shells
加入如下代码
复制代码
代码如下:
/bin/false
新建用户ftpuser1和用户组ftp并设置密码,此用户不需要有效的shell(更安全),所以选择/bin/false
给fptuser1
复制代码
代码如下:
sudo groupadd ftp
sudo useradd ftpuser1 -p pass -g ftp -d /home/ftp -s /bin/false
在/home/ftp目录下新建upload和download目录并修改权限
复制代码
代码如下:
cd /home/ftp
sudo mkdir download
sudo mkdir upload
cd /home
sudo chmod 755 ftp
cd /home/ftp
sudo chmod 755 download
sudo chmod 777 upload
三、修改proftpd核心配置文件proftpd.conf
复制代码
代码如下:
sudo vim /etc/proftpd/proftpd.conf
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#
# Includes DSO modules
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off # 我们不需要IPv6,所以off
ServerName "xiaoyigeng's FTP Server" # 修改服务器名
ServerType standalone # 服务器运行模式,这里填standalone,也可以选
inetd
DeferWelcome on # 用户登陆时是否显示欢迎信息
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600 # 可以降到100
TimeoutIdle 1200 # 发呆超时
DisplayLogin welcome.msg # 如果上边DeferWelcom设置成on,则显示
welcome.msg中的内容
DisplayFirstChdir .message # 更改目录时显示的内容
ListOptions "-l"
DenyFilter /*.*/
# Use this to jail all users in their homes
DefaultRoot /home/ftp # ftp用户被限制在这个目录中
# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell off # 匿名用户要选on
# Port 21 is the standard FTP port.
Port 21 # 服务运行的端口
# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts 49152 65534 # PASV模式下用到的端口
# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress 1.2.3.4
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User nobody # 服务器运行在nobody用户下
Group nobody # 服务器运行在nobody组下
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022 # 默认新建文件的权限
# Normally, we want files to be overwriteable.
AllowOverwrite on # 文件可以被覆盖
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd off
# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile off
# Choose a SQL backend among MySQL or PostgreSQL.
# Both modules are loaded in default configuration, so you have to specify the backend
# or comment out the unused module in /etc/proftpd/modules.conf.
# Use 'mysql' or 'postgres' as possible values.
#
#IfModule mod_sql.c
# SQLBackend mysql
#/IfModule
TransferLog /var/log/proftpd/xferlog # 传送文件日志
SystemLog /var/log/proftpd/proftpd.log # 系统运行日志
IfModule mod_tls.c
TLSEngine off
/IfModule
IfModule mod_quota.c
QuotaEngine on
/IfModule
IfModule mod_ratio.c
Ratios on
/IfModule/pp# Delay engine reduces impact of the so-called Timing Attack described in
# a href="http://security.lss.hr/index.php?page=detailsID=LSS-2004-10-02"http://security.lss.hr/index.php?page=detailsID=LSS-2004-10-02/a
# It is on by default.
IfModule mod_delay.c
DelayEngine on
/IfModule
IfModule mod_ctrls.c
ControlsEngine on
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
/IfModule
IfModule mod_ctrls_admin.c
AdminControlsEngine on
/IfModule
# A basic anonymous configuration, no upload directories.
# Anonymous ~ftp
# User ftp
# Group nogroup
# # We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
# # Cosmetic changes, all files belongs to ftp user
# DirFakeUser on ftp
# DirFakeGroup on ftp
#
# RequireValidShell off
#
# # Limit the maximum number of anonymous logins
# MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayFirstChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
# Directory *
# Limit WRITE
# DenyAll
# /Limit
# /Directory
#
# # Uncomment this if you're brave.
# # Directory incoming
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # Limit READ WRITE
# # DenyAll
# # /Limit
# # Limit STOR
# # AllowAll
# # /Limit
# # /Directory
#
# /Anonymous
# Valid Logins # 以下部分为设置用户权限部分
Limit LOGIN
AllowUser ftpuser1
DenyAll
/Limit
Directory /home/ftp
Umask 022 022
AllowOverwrite off
Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD
DenyAll
/Limit
/Directory
Directory /home/ftp/download/
Umask 022 022
AllowOverwrite off
Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD
DenyAll
/Limit
/Directory
Directory /home/ftp/upload/
Umask 022 022
AllowOverwrite on
Limit READ RMD DELE
DenyAll
/Limit
Limit STOR CWD MKD
AllowAll
/Limit
/Directory
四、启动、停止、重启服务器
复制代码
代码如下:
sudo /etc/init.d/proftpd start
sudo /etc/init.d/proftpd stop
sudo /etc/init.d/proftpd restart
五、维护
可以到/var/log/proftpd目录查看日志
查看ftp服务器负载命令 ftptop
查看什么认登陆服务器 ftpwho
PS:proftpd中Limit的使用介绍
我们用到的比较多的可能是Limit的使用,Limit大致有以下动作,基本能覆盖全部的权限了。
CMD:Change Working Directory 改变目录
MKD:MaKe Directory 建立目录的权限
RNFR: ReName FRom 更改目录名的权限
DELE:DELEte 删除文件的权限
RMD:ReMove Directory 删除目录的权限
RETR:RETRieve 从服务端下载到客户端的权限
STOR:STORe 从客户端上传到服务端的权限
READ:可读的权限,不包括列目录的权限,相当于RETR,STAT等
WRITE:写文件或者目录的权限,包括MKD和RMD
DIRS:是否允许列目录,相当于LIST,NLST等权限,还是比较实用的
ALL:所有权限
LOGIN:是否允许登陆的权限
针对上面这个Limit所应用的对象,又包括以下范围
AllowUser 针对某个用户允许的Limit
DenyUser 针对某个用户禁止的Limit
AllowGroup 针对某个用户组允许的Limit
DenyGroup 针对某个用户组禁止的Limit
AllowAll 针对所有用户组允许的Limit
DenyAll 针对所有用户禁止的Limit
关于限制速率的参数为:
TransferRate STOR|RETR 速度(Kbytes/s) user 使用者
如何安装Ubuntu1804LTS桌面和服务器版
安装Ubuntu 18.04 LTS Server点击下载 Ubuntu 18.04 LTS Server 版,用前面介绍的方法制作成安装 U 盘。用制作好的启动盘引导 Ubuntu 18.04 LTS Server,您将可以看到如下屏幕。选择您的首选安装语言,然后按「回车」。(服务器版本建议直接使用英文)选择键盘布局和配置语言,然后按「回车」键继续。...
Ubuntu 14.04 文件服务器--samba的安装和配置
3、输入"sudo service smbd restart"重启samba服务--回车--服务重启成功。访问共享名为myshare的共享目录 1、在"运行"窗口中输入"\\\\192.168.1.4"--回车--双击打开myshare--回车--输入用户名和密码--回车--访问成功。
Ubuntu安装ssh服务器端,不成功,为什么
安装 OpenSSH Server 是无比轻松的一件事情,需要的命令只有一条: sudo apt-get install openssh-server 随后,Ubuntu 会自动下载并安装 openssh server,并一并解决所有的依赖关系。当您完成这一操作后,您可以找另一台计算机,然后使用一个 SSH 客户端软件(强烈推荐 PuTTy),输入您服务器的 IP ...
Ubuntu 13.04 服务器版本系统安装图解教程
32位:http:\/\/mirrors.163.com\/ubuntu-releases\/13.04\/ubuntu-13.04-server-i386.iso 64位:http:\/\/mirrors.163.com\/ubuntu-releases\/13.04\/ubuntu-13.04-server-amd64.iso 用启动盘成功引导之后,出现下面的界面 选择语言:中文(简体)默认第一项:安装Ubuntu服务器版 询问是否继续安装所选择的...
华为x86服务器安装ubuntu挂载驱动
1. 下载驱动程序:首先需要从华为官网或其他可信渠道下载适用于该服务器型号的驱动程序。2. 解压驱动程序:将下载的驱动程序解压到一个指定的目录中,以便后续的安装使用。3. 安装驱动程序:使用终端或图形化界面工具,进入到驱动程序所在的目录,并按照提供的安装指南进行驱动程序的安装。4. 重新启动服务...
服务器Ubuntu操作系统的安装
在服务器上插好U盘之后,按F11进入Boot Manager(启动管理)界面,进入Boot Manager,点击One-shot BIOS Boot Menu(一键BIOS启动菜单)。进入Boot Menu,找到U盘。1、选择您所想要的语言(英语)2.安装ubuntu 服务器 3.选择系统语言,使用英语。5、选择区域,选择香港,选择美国也可以。6.不修改键盘映射。...
Ubuntu的linux服务器版怎么安装软件
ubuntu下安装程序的三种方法:一、apt-get方法 1、使用apt-get install来安装应用程序算是最常见的一种安装方法了,比如安装build-essential这个软件,并且会把所有的依赖包都一起安装了。2、下面给出apt-get的的各种参数:apt-get install xxx 安装xxx 。如果带有参数,那么-d 表示仅下载 ,-f 表示...
ubuntu20.04服务器版安装最小图形界面
1、首先需要确保您已经在 \/etc\/apt\/sources.list 文件中启用了 Universe 和 Multiverse 软件库。2、其次执行如下命令,保存并退出,然后执行以下命令。3、最后输入你的用户名和口令(Ubuntu 系统中具备 sudo 权限的用户,或者是 root 帐号)登录后进入管理页面即可安装小图形界面。
如何在ubuntu中安装设置ftp服务器
然后重启ftp服务,使用命令sudo service vsftpd restart重启ftp服务。测试ftp,复制一些文件到\/home\/ftp目录下 方法一:在浏览器中输入ftp:\/\/localhost,网页登录。方法二:在终端中输入ftp localhost,然后输入用户名与密码实现登录。如果登录ftp总是出现密码错误,可以将\/etc\/vsftpd.conf配置文件的pam_...
ubuntu环境Odoo9快速安装教程
方法\/步骤 1、安装VMware软件 2、安装Ubuntu14.04系统 不清楚的请参考下面两个链接:0VMware Workstation 12 安装 1VMware安装Ubuntu 14.04系统 打开终端(Terminal)更新Ubuntu服务器软件源 增加阿里云ubuntu的软件更新源,速度更快(阿里云服务器已添加)sudo sed-i's|cn.archive.ubuntu.com|mirrors.ali...
亢柱清感: 1- 使用下面的命令安装proftpd: Code: sudo apt-get install proftpd 2- 在etc/shells 加入如下代码 (sudo gedit /etc/shells to open the file)(译注:命令行模式下sudo vi /etc/...
汉川市13415215146: 如何在ubuntu中安装设置ftp服务器 - ?
亢柱清感: 你好,1、更新软件源,保证源是最新的,这样有利于下面在线通过apt-get install命令安装ftp.2、使用sudo apt-get install vsftp命令安装vsftp,安装软件需要root权限,我们使用sudo来暂时获取.3、安装好ftp后默认是会自动创建ftp用户的,然后...
汉川市13415215146: 如何在Linux上安装一个开源VPN服务器 - ?
亢柱清感: 这个问题,说难也难,说容易也容易 .首先,你要先确认你找到的哪个VPN服务器确实有linux版本.第2,要知道,你找到的哪个VPN服务器是工作在哪一种 linux发行版下的.象以.deb为...
汉川市13415215146: 如何在ubuntu中安装设置tp服务器 - ?
亢柱清感: 1,安装postfix、SASL及smtp服务 apt-get install postfix libsasl2 sasl2-bin libsasl2-modules libdb3-util procmail 您将会被问一些问题:General type of configuration? Mail name? 2,配置postfix dpkg-reconfigure postfix 您将再次被问一些问题:...
汉川市13415215146: 如何为ubuntu server 14.04 安装图形界面 - ?
亢柱清感: 方法/步骤 首先,ubuntu server版本的安装这里就不再赘述,基本的还是三个步骤,首先是下载镜像,然后使用ultraISO刻录至u盘,最后通过U盘引导进行安装.安装过程中,会要求你输入用户名和密码,一定要牢记,因为后续软件的安装都需要...
汉川市13415215146: Linux是不是安装了PROFTP就相当于建立了一个FTP服务器??
亢柱清感: 并不是,虽然安装了但是还要配置许多参数,以及外接参数
汉川市13415215146: ubuntu怎么搭建ftp服务器并配置端口号 - ?
亢柱清感: 架设ftp服务器应该安装 ftpd并启动. 如果只是临时使用的话推荐使用更安全的sftp,不需要任何安装. 直接访问sftp://:22 输入系统帐号密码即可
汉川市13415215146: Ubuntu 16.04 64位服务器使用ftp的方法 - ?
亢柱清感: 最好安装openssh-server,连接时用sftp协议 ftp协议不是很适用于linux
汉川市13415215146: 如何在Ubuntu服务器上安装和配置DHCP服务 - ?
亢柱清感: 系统自带,如果没有安装,用yum安装即可. yum install dhcp 安全完后,创建配置文件 cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcpd.conf 其中 option routers 为你要配置的网关地址(通常为dhcp即本机的ip); option subnet-mask 子网掩码 ;其他项默认即可.保存配置文件后就可以启动服务了./etc/init.d/dhcpd start 我使用的系统是ubuntu-12.04-alternate-i386,是否使用wide-dhcpv6搭建,但是不知道/etc/wide-dhcpv6/dhcp6s.conf怎么配置
汉川市13415215146: Ubuntu的linux服务器版怎么安装软件 - ?
亢柱清感: ubuntu下安装程序的三种方法:一、apt-get方法1、使用apt-get install来安装应用程序算是最常见的一种安装方法了,比如安装build-essential这个软件,并且会把所有的依赖包都一起安装了.2、下面给出apt-get的的各种参数:apt-get install xxx ...