在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 ftpdirectory 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 $ ...
随机推荐
- NS2学习笔记(三)
代理(Agents) 代理是网络层数据包产生和使用的端点,用于实现多层的协议.Agent类部分用OTcl实现,部分用C++实现.C++的代码在~ns/agent.cc和~ns/agent.h中,OTc ...
- Ubuntu下搭建repo服务器(二): 配置git-daemon-run
git-daemon-run实际是一个脚本管理工具,用来启动git-daemon. 1 安装git-daemon-run(A端) apt-get install git-daemon-run 2. 配 ...
- Squirrel的安装(windows上Phoneix可视化工具)
一.下载安装 下载地址:http://www.squirrelsql.org/下载所需版本 或者 从网址http://www.squirrelsql.org/下载相应版本的squirrel ...
- vs2010 视图 aspx页面设计窗口创建控件时出错 未将对象引用设置到对象的实例
第一步,首先关闭aspx页面 第二步,在单击项目右击,选择“清理” 第三步,然后在打开aspx页面,就可以看到正常的页面了. 注:一次不行的会,多做几次. 如果还是不行的话,你看看你.cs页面是否继承 ...
- Java—解压zip文件
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import ja ...
- 初学者Android studio安装
学习过java基础,最近趁着大量课余时间想学习Android开发.百度很多资料Android studio,由Google开发的开发工具,那就不需要再多说.对于初学者的我来说,一定足够用了.此文主要介 ...
- PHP开发之旅-提取表单提交内容发送邮件
在实际项目开发中,我们经常需要得到用户的反馈信息并及时回复.普通的留言板有一定的内容限制,而邮件则能满足这个需求.今天给大家演示一下怎么利用PHP发送电子邮件. 1.创建表单 <form nam ...
- 使用 Spring Social 连接社交网络
Spring Social 框架是spring 提供社交平台的分享组件 https://www.ibm.com/developerworks/cn/java/j-lo-spring-social/
- Split()函数
最近遇到一个有趣的问题关于使用Split函数 ,该函数能够根据传递的参数拆分,并返回一个string的数组. 贴出一个奇怪的例子 using System; using System.Collecti ...
- js的三种对象
JS中,可以将对象分为“内部对象”.“宿主对象”和“自定义对象”三种. 1,内部对象 js中的内部对象包括Array.Boolean.Date.Function.Global.Math.Number. ...