Centos开启FTP及用户配置
vsftpd作为FTP服务器,在Linux系统中是非常常用的。下面我们介绍如何在centos系统上安装vsftp。
什么是vsftpd
vsftpd是一款在Linux发行版中最受推崇的FTP服务器程序。特点是小巧轻快,安全易用。
vsftpd 的名字代表”very secure FTP daemon”, 安全是它的开发者 Chris Evans 考虑的首要问题之一。在这个 FTP 服务器设计开发的最开始的时候,高安全性就是一个目标。
安装vsftpd
1、以管理员(root)身份执行以下命令
- yum install vsftpd
2、设置开机启动vsftpd ftp服务
- chkconfig vsftpd on
3、启动vsftpd服务
- service vsftpd start
管理vsftpd相关命令:
停止vsftpd: service vsftpd stop
重启vsftpd: service vsftpd restart
配置防火墙
打开/etc/sysconfig/iptables文件
- vi /etc/sysconfig/iptables
在REJECT行之前添加如下代码
- -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
保存和关闭文件,重启防火墙
- service iptables start
配置vsftpd服务器
默认的配置文件是/etc/vsftpd/vsftpd.conf,你可以用文本编辑器打开。
- vi /etc/vsftpd/vsftpd.conf
添加ftp用户
下面是添加ftpuser用户,设置根目录为/home/wwwroot/ftpuser,禁止此用户登录SSH的权限,并限制其访问其它目录。
1、修改/etc/vsftpd/vsftpd.conf
将底下三行
- #chroot_list_enable=YES
- # (default follows)
- #chroot_list_file=/etc/vsftpd.chroot_list
改为
- chroot_list_enable=YES
- # (default follows)
- chroot_list_file=/etc/vsftpd/chroot_list
3、增加用户ftpuser,指向目录/home/wwwroot/ftpuser,禁止登录SSH权限。
- useradd -d /home/wwwroot/ftpuser -g ftp -s /sbin/nologin ftpuser
4、设置用户口令
- passwd ftpuser
5、编辑文件chroot_list:
- vi /etc/vsftpd/chroot_list
内容为ftp用户名,每个用户占一行,如:
user11
6、重新启动vsftpd
- service vsftpd restart
另外,如果觉得以后管理ftp用户名嫌麻烦,可以使用centos官方发布的脚本管理。地址如下:
http://wiki.centos.org/HowTos/Chroot_Vsftpd_with_non-system_users
7、注意用户权限配置
chmod 755 /home/wwwroot/ftpuser
Centos开启FTP及用户配置的更多相关文章
- CentOS使用vsftpd开启FTP服务以及配置用户
1.安装服务 #yum install vsftpd 2.配置 #vi /etc/vsftpd/vsftpd.conf # 禁止匿名访问 anonymous_enable=NO # 允许本地用户登录F ...
- 转 CentOS开启FTP及配置用户
原文链接: http://www.centos.bz/2011/03/centos-install-vsftpd-ftp-server/ vsftpd作为FTP服务器,在Linux系统中是非常常用的. ...
- CentOS开启FTP及配置用户
vsftpd作为FTP服务器,在Linux系统中是非常常用的.下面我们介绍如何在centos系统上安装vsftp. 什么是vsftpd vsftpd是一款在Linux发行版中最受推崇的FTP服务器程序 ...
- centos开启ftp服务
新安装的要先配置网络 $_> vi /etc/sysconfig/network-scripts/ifcfg-eno16777736 最后一行 onboot = yes $_> yum i ...
- CentOS下FTP服务器安装与配置
安装vsftpd yum install vsftpd 启动/重启/关闭vsftpd服务器 CentOS7 以下: 启动: service vsftpd start 停止: service vsftp ...
- centos开启ftp服务的步骤
1.安装vsftpd sudo yum install vsftpd -y 2.启动ftp服务 service vsftpd start 3. 加入开机启动 chkconfig vsftpd on ...
- Centos安装FTP服务器和配置
安装 yum install vsftpd 启动/重启/关闭 /sbin/service vsftpd start /sbin/service vsftpd restart /sbin/service ...
- CentOS 6.8 ftp服务安装配置 基于本地用户和虚拟用户
CentOS 6.8 ftp服务安装配置 基于本地用户和虚拟用户 一.安装ftp服务 1.检查是否已经安装 # rpm -qa | grep ftp ftp-0.17-54.el6.x86_64 vs ...
- centos下开启ftp服务
如果要ftp访问linux需要安装ftp服务,vsftpd是Linux下比较好的的FTP服务器. 一.检查安装vsftp //检查是否安装vsftpd rpm -qa | grep vsftpd // ...
随机推荐
- sigar监控
相关参照博客: http://liningjustsoso.iteye.com/blog/1254584 http://blog.csdn.net/aoxida/article/category/12 ...
- android96 内存创建图片副本,画画板
package com.itheima.copy; import android.os.Bundle; import android.app.Activity; import android.grap ...
- wireshark抓包图解 TCP三次握手/四次挥手详解
http://www.seanyxie.com/wireshark%E6%8A%93%E5%8C%85%E5%9B%BE%E8%A7%A3-tcp%E4%B8%89%E6%AC%A1%E6%8F%A1 ...
- How does CCFileUTils::fullPathForFilename work
OverView The purpose of this document is show you how does function CCFileUtils::fullPathForFilename ...
- 【转】Hibernate映射机制之XXX.hbm.xml
http://blog.csdn.net/a9529lty/article/details/6454924[注意多对一中“多”和“一”各自的java文件.xml文件的书写格式] 另外两篇总结:http ...
- mysql远程连接错误提醒:2013-Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
因为没有匹配/etc/hosts.allow. 解决方法: 1.在hosts.allow 文件中添加 mysqld:ALL [root@ucDB204 ~]# cat /etc/hosts.allow ...
- Linux软件安装与卸载
一. 了解Linux应用软件安装包: 通常Linux应用软件的安装包有三种: 1) tar包,如software-1.2.3-1.tar.gz.它是使用UNIX系统的打包工具tar打包的. 2) rp ...
- order by跟group by 跟having(2)
- MVC小系列(十六)【在控制器级别或具体Action级别上动态设定模板页(Layout)】
方法就是使用:ActionFilterAttribute它的几个方法:OnActionExecuted,OnActionExecuting,OnResultExecuted和OnResultExecu ...
- Saltstack安装配置(一)
一.服务端和客户端安装 1.下载epel源 http://mirrors.zju.edu.cn/epel/6/ #wget http://mirrors.zju.edu.cn/epel/6/x86_6 ...