在Ubuntu 14.04 上安装 FTP 服务
1. sudo apt-get update
2. sudo apt-get install vsftpd
3. adduser sammy
Assign a password when prompted and feel free to press "ENTER" through the other prompts.
FTP is generally more secure when users are restricted to a specific directory.vsftpd
accomplishes this with chroot
jails. When chroot
is enabled for local users, they are restricted to their home directory by default. However, because of the way vsftpd
secures the directory, it must not be writable by the user. This is fine for a new user who should only connect via FTP, but an existing user may need to write to their home folder if they also shell access.
In this example, rather than removing write privileges from the home directory, we're will create an ftp
directory to serve as the chroot
and a writable files
directory to hold the actual files.
Create the ftp
folder, set its ownership, and be sure to remove write permissions with the following commands:
- sudo mkdir /home/sammy/ftp
- sudo chown nobody:nogroup /home/sammy/ftp
- sudo chmod a-w /home/sammy/ftp
除了途中两处外,还有一处: , 不加这句的话,在ftp客户端不能重命名文件或文件夹。
重启vsftpd service vsftpd restart
在Ubuntu 14.04 上安装 FTP 服务
第一步>>更新库
linuxidc@linuxidc:~$ sudo apt-get update
第二步>>采用如下命令安装VSFTPD的包
linuxidc@linuxidc:~$ sudo apt-get install vsftpd
第三步>>安装完成后打开 /etc/vsftpd.conf 文件,按如下所述修改。
取消如下行的注释(行号为29和33)
write_enable=YES
local_umask=022
>> 取消如下行的注释(行号120)来阻止除了用户文件夹意外的文件夹。
chroot_local_user=YES
在文件最后增加如下一行:
allow_writeable_chroot=YES
在Ubuntu 14.04 上安装 FTP 服务的更多相关文章
- 翻译:在Ubuntu 14.04上安装FTP服务器的方法
说明: 1.原文地址:http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/ 2.今天要做一个网络日志的迁移程序,搬 ...
- Ubuntu 14.04 上安装 Gurobi
参考: Installing Gurobi 7 on Linux Ubuntu 14.04 上安装 Gurobi 1.在gurobi上创建一个账户,并登陆: 2.从gurobi optimizer上下 ...
- 如何在 Ubuntu 14.04 上安装 Elasticsearch,Logstash 和 Kibana
介绍 在本教程中,我们将去的 Elasticsearch 麋鹿堆栈安装 Ubuntu 14.04 — — 那就是,Elasticsearch 5.2.x,Logstash 2.2.x 和 Kibana ...
- Ubuntu 14.04上安装caffe
本来实在windows 10上尝试安装caffe,装了一天没装上,放弃; 改在windows上装ubuntu的双系统,装了一个下午,不小心windows的系统盘被锁死了,也不会unlock?只好含泪卸 ...
- 在Ubuntu 14.04 上安装网易云音乐
之前因为电脑有网络的原因,一直使用网页网易云音乐听歌,最近电脑没网络使用,才发现网易云音乐有linux版本,果断下载. 在Chrome浏览器中,登陆官网下载Linux版本中的Ubuntu 14.04 ...
- ubuntu 14.04 上安装有道词典
Ubuntu 14.04用户在安装前要更新系统,即update&dist-upgrade. 下载地址:32/64bits http://codown.youdao.com/cidian/lin ...
- 在ubuntu 14.04上安装2.6的内核
1.到http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.bz2这里下载最新的稳定版内核: 2.根据各自系统,安装如下软件:l b ...
- 在 Ubuntu 14.04 上安装 Ubuntu Tweak 0.8.8
转自:http://linux.cn/article-3335-1.html 关于 Ubuntu Tweak,Ubuntu 老用户再熟悉不过了,Ubuntu tweak 相当于 windows 的优化 ...
- Ubuntu 14.04上安装Riak
一.安装riak 1. 安装包:riak_2.0.2-1_amd64.deb 路 径:~/software/riak_2.0.2-1_amd64.deb 2. 安装riak $ ...
随机推荐
- 解决input输入框在iOS中有阴影问题
input{ -webkit-appearance: none; }
- 【知识总结】卡特兰数 (Catalan Number) 公式的推导
卡特兰数的英文维基讲得非常全面,强烈建议阅读! Catalan number - Wikipedia (本文中图片也来源于这个页面) 由于本人太菜,这里只选取其中两个公式进行总结. (似乎就是这两个比 ...
- [ USACO 2018 OPEN ] Out of Sorts (Platinum)
\(\\\) \(Description\) 对一长为\(N\)的数列\(A\)排序,不保证数列元素互异: 数列\(A\)中\(A[1...i]\)的最大值不大于\(A[i+1-N]\)的最小值,我们 ...
- Android项目实战_手机安全卫士拦截骚扰
###1.骚扰拦截需求分析1.界面1.1 黑名单列表界面1.2 添加黑名单界面2.功能2.1 黑名单的添加.删除2.2 拦截电话2.3 拦截短信 ###2.黑名单数据库的创建1.分析需要的字段id 主 ...
- Android studio 中R.menu的创建
对于Android开发中的menu没有声明的情况: 首先,将鼠标定位到红色的menu上面, 然后,Alt+enter组合键,建立文件menu, 然后将以下代码复制进去: <item androi ...
- Linux 查询PID和端口号
https://www.cnblogs.com/understander/p/5546458.html
- THREE.js代码备份——webgl - scene animation(通过加载json文件来加载动画和模型)
<!DOCTYPE html> <html lang="en"> <head> <title>three.js webgl - sc ...
- ABP初始化
默认认为你手中已经有abp-zero项目,当前4.6.0 angularJS切换到jquery 运行项目,初始化是跳转到~/App/common/views/layout/layout.cshtml, ...
- iOS 9 中可用的受信任根证书列表
iOS 受信任证书存储区包含随 iOS 预安装的可信根证书. https://support.apple.com/zh-cn/HT205205 关于信任和证书 iOS 9 受信任证书存储区包含三类证 ...
- C# 获得星期几
var temp = System.DateTime.Today.ToString("dddd", new System.Globalization.CultureInfo(&qu ...