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 服务的更多相关文章

  1. 翻译:在Ubuntu 14.04上安装FTP服务器的方法

    说明: 1.原文地址:http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/ 2.今天要做一个网络日志的迁移程序,搬 ...

  2. Ubuntu 14.04 上安装 Gurobi

    参考: Installing Gurobi 7 on Linux Ubuntu 14.04 上安装 Gurobi 1.在gurobi上创建一个账户,并登陆: 2.从gurobi optimizer上下 ...

  3. 如何在 Ubuntu 14.04 上安装 Elasticsearch,Logstash 和 Kibana

    介绍 在本教程中,我们将去的 Elasticsearch 麋鹿堆栈安装 Ubuntu 14.04 — — 那就是,Elasticsearch 5.2.x,Logstash 2.2.x 和 Kibana ...

  4. Ubuntu 14.04上安装caffe

    本来实在windows 10上尝试安装caffe,装了一天没装上,放弃; 改在windows上装ubuntu的双系统,装了一个下午,不小心windows的系统盘被锁死了,也不会unlock?只好含泪卸 ...

  5. 在Ubuntu 14.04 上安装网易云音乐

    之前因为电脑有网络的原因,一直使用网页网易云音乐听歌,最近电脑没网络使用,才发现网易云音乐有linux版本,果断下载. 在Chrome浏览器中,登陆官网下载Linux版本中的Ubuntu 14.04 ...

  6. ubuntu 14.04 上安装有道词典

    Ubuntu 14.04用户在安装前要更新系统,即update&dist-upgrade. 下载地址:32/64bits http://codown.youdao.com/cidian/lin ...

  7. 在ubuntu 14.04上安装2.6的内核

    1.到http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.bz2这里下载最新的稳定版内核: 2.根据各自系统,安装如下软件:l b ...

  8. 在 Ubuntu 14.04 上安装 Ubuntu Tweak 0.8.8

    转自:http://linux.cn/article-3335-1.html 关于 Ubuntu Tweak,Ubuntu 老用户再熟悉不过了,Ubuntu tweak 相当于 windows 的优化 ...

  9. Ubuntu 14.04上安装Riak

    一.安装riak   1. 安装包:riak_2.0.2-1_amd64.deb    路    径:~/software/riak_2.0.2-1_amd64.deb 2. 安装riak     $ ...

随机推荐

  1. Python3安装Scrapy

     Microsoft Visual C++ Build Tools 最近项目在写爬虫,项目经理给了个Python Scrapy的爬虫项目,要求使用Java实现相关功能.于是乎在本地先后安装了Pytho ...

  2. 挂载硬盘,提示 mount: unknown filesystem type 'LVM2_member'的解决方案

    问题现象:由于重装linux,并且加了固态硬盘,直接将系统装在固态硬盘中.启动服务器的时候, 便看不到原来机械硬盘的挂载目录了,不知如何访问机械硬盘了.直接用命令 mount /dev/sda3 /s ...

  3. 【译】x86程序员手册09-第3章程序指令集

    注:觉得本章内容与理解操作系统不直接相关,所以本章并未看完,也就没有翻译完,放在这里中是为了保证手册的完整.有兴趣的人可以去原址查看. https://pdos.csail.mit.edu/6.828 ...

  4. Caffe2:段错误(核心 已转储)

    测试Caffe的时候, cd ~ && python -c 'from caffe2.python import core' 2>/dev/null && ech ...

  5. iOS错误报告中关于崩溃地址的分析

    http://blog.csdn.net/gaoyp/article/details/46912753 一.错误报告中的三种地址:stack addressload addresssymbol add ...

  6. UIResponder详解

    UIResponder Class Reference Managing the Responder Chain 1.- (UIResponder *)nextResponder 返回接收者的下一个相 ...

  7. post发送 ArrayBuffer

    // 用 POST 方法将 ArrayBuffer 发送到服务器 ); var longInt8View = new Uint8Array(myArray); ; i< longInt8View ...

  8. 浏览器加载 CommonJS 模块的原理与实现 (阮一峰大哥的 http://www.ruanyifeng.com/blog/2015/05/commonjs-in-browser.html)

    就在这个周末,npm 超过了 cpan ,成为地球上最大的软件模块仓库. npm 的模块都是 JavaScript 语言写的,但浏览器用不了,因为不支持 CommonJS 格式.要想让浏览器用上这些模 ...

  9. 微信小程序音频长度获取的问题

    小程序推荐使用wx.createInnerAudioContext()创建的innerAudioContext,我们也通过这个接口创建音频.音频的长度可以通过属性获取: 但是,给innerAudioC ...

  10. Fedora 和 RedHat 以及 SUSE 中 YUM 工具的使用

    参考博客:https://www.cnblogs.com/good-study/p/9928587.html 一.yum命令概述: 1.简介: yum命令时在Fedora和RedHat以及SUSE中基 ...