yum安装ftp服务器
1、安装vsftp,本文采用yum安装:
#yum install vsftpd
2、安装后运行:
# service vsftpd restart
Shutting downvsftpd: [ OK ]
Starting vsftpd forvsftpd: [ OK ]
3、新增加系统用户ftptest:
#useradd -d /var/www -s /sbin/nologin gd_user1 //增加新用户ftptest不让在本机登陆
#chown -R gd_user1/var/www //更改新增目录的权限,只允许ftptest访问此目录;
#chmod 777 -R /var/www
# passwd gd_user1 //为用户设置密码;
Changing password for user gd_user1.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENTcharacters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
5、修改vsftpd.conf 禁止匿名帐号登陆及允许自建帐号登陆:
#vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
4、修改/etc/vsftpd/chroot_list 添加gd_user1帐号允许该帐号登陆FTP服务器
vi /etc/vsftpd/chroot_list
输入gd_user1
5、在linux Shell 命令模式下
#setsebool ftpd_disable_trans 1 // 关闭掉Selinux 对ftp服务的保护;
#vi /etc/selinux/config
SELINUX=disabled //将此处设置为Disable
# SELINUXTYPE= type of policy in use. Possible valuesare:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
重启服务
# service vsftpd restart
Shutting downvsftpd: [ OK ]
Starting vsftpd forvsftpd: [ OK ]
记得关闭火墙
yum安装ftp服务器的更多相关文章
- 安装ftp 服务器
安装ftp 服务器 #yum install vsftp 安装ftp 客户端 重启ftp服务器 sudo /etc/init.d/vsftpd restart /start /stop 进行ARM 和 ...
- ubuntu安装ftp服务器
ubuntu安装ftp服务器 1: 安装vsftpd ~$ sudo apt-get install vsftpd ubuntu10.10自己装了,这步省略. 2: 配置vsftpd 2.1 修改vs ...
- 基于CentOS安装FTP服务器
操作系统环境: CentOS Linux release 7.4.1708 (Core) 使用yum安装ftp服务: yum install -y vsftpd 添加系统用户作为登录ftp服务器并修改 ...
- CentOS 7运维管理笔记(4)----安装ftp服务器
在CentOS 7下安装ftp服务器,可以使局域网内的主机拥有共享文件的一个站点. 在Linux系统下,vsftp是一款应用比较广泛的FTP软件,其特点是小巧轻快,安全易用.目前在开源操作系统中常用的 ...
- 第21篇 ubuntu安装ftp服务器(转载)
ubuntu安装ftp服务器 1: 安装vsftpd ~$ sudo apt-get install vsftpd ubuntu10.10自己装了,这步省略. 2: 配置vsftpd 2.1 修改vs ...
- CentOS 6.9 安装 ftp 服务器
昨天为了方便上传写好的博客 .md 文件到服务器上,就在服务器搭建了一个 ftp 服务端用来上传写好的博客.很久之前我也使用虚拟机搭建过 ftp 服务器,但是时间久了,很多都忘记了.于是乎又一顿 Go ...
- Ubuntu 16.04 安装ftp服务器传输文件
最近在搞深度学习,老师比较宝贝他的服务器,要求我以后负责管理服务器.往后所有要使用服务器的人都必须向我申请账号,然后只允许客户端访问,使用文件传输软件传输文件.像我这样一个linux菜逼,这种要求不是 ...
- 翻译:在Ubuntu 14.04上安装FTP服务器的方法
说明: 1.原文地址:http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/ 2.今天要做一个网络日志的迁移程序,搬 ...
- 树莓派安装ftp服务器
在树莓派安装ftp服务器,可上载\下载文件 vsftpd是开源的轻量级的常用ftp服务器. 1,安装vsftpd服务器 (约400KB)sudo apt-get install vsftpd 2,启动 ...
随机推荐
- House Robber II——Leetcode
After robbing those houses on that street, the thief has found himself a new place for his thievery ...
- maya绝招(41--60)
第41招 捕捉和旋转 从MAYA5开始,双击工具箱中的移动缩放旋转工具,马上就可以调出工具属性栏.以旋转为例,将Snap Rotate勾选,并设置Step Size数值,就可以旋转特定的数值了 第42 ...
- NDK的安装和下载
从官网下载NDK 下载页面:https://developer.android.com/ndk/downloads/index.html 从镜像站点下载NDK "大师兄"是一个由腾 ...
- JavaScript 兼容处理IE67之 !"a"[0]
IE67对字符串进行取值需要使用charAt()方法,不能直接通过数组方式的坐标访问: <!DOCTYPE html> <html> <head> <meta ...
- 如何将下载好的jar包添加到maven本地仓库
1.首先在pom.xml中添加 <dependency> <groupId>org.springframework.security</groupId> ...
- JAVA Calendar具体解释
(在文章的最后,将会介绍Date类,假设有兴趣,能够直接翻到最后去阅读) 到底什么是一个 Calendar 呢?中文的翻译就是日历,那我们立马能够想到我们生活中有阳(公)历.阴(农)历之分.它们的差别 ...
- [JS][jQuery]remove()与 empty()的差别
要用到移除指定元素的时候,发现empty()与remove([expr])都能够用来实现.可细致观察效果的话就能够发现. empty()是仅仅移除了 指定元素中的全部子节点.拿$("p&qu ...
- [Reactive Programming] RxJS dynamic behavior
This lesson helps you think in Reactive programming by explaining why it is a beneficial paradigm fo ...
- iOS IAP教程
1. 创建应用 首先进入iTunes Connect然后按下 Manage Your Applications 接下来按下Add New Applicationbutton创建应用 2. 在应用中创建 ...
- 【linux驱动分析】ioctl函数的使用
一.用户空间的ioctl int ioctl(int fd, unsigned long cmd, void *data); 第一个參数是文件描写叙述符,第二个參数代表传递的命令,它会原样传 ...