在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 $ ...
随机推荐
- 判断IOS静态库(.a文件)是否支持模拟器和真机运行
判断IOS静态库(.a文件)是否支持模拟器和真机运行 在mac终端下,进入到.a文件目录下,然后输入: lipo -info libMyAlertView.a Architectures in the ...
- flask 初始
一.flask安装 这里提供两种安装方式: 第一种: pip3 install flask 第二种: pip3 install -i https://pypi.douban.com/simple/ f ...
- ACM_Power Mouth
Power Mouth Time Limit: 2000/1000ms (Java/Others) Problem Description: Your task is to calculate the ...
- 胖ap和瘦ap的区别
一,什么是AP,胖瘦AP如何区分? 先说说AP的概念.AP是Access Point的简称,即无线接入点,其作用是把局域网里通过双绞线传输的有线信号(即电信号)经过编译,转换成无线电信号传 ...
- css3 画小蜜蜂
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- 忘记Oracle密码
1./as sysdba 2.然后你忘记密码的用户名例如Scott alter user scott identified by root 3.exit 4.sqlplus 重新登录
- ionic2/3 禁止屏幕旋转,禁止横屏,竖屏
ionic2/ionic3禁止屏幕旋转,及解除禁止旋转 1.添加插件: cmd到项目目录---> cordova plugin add cordova-plugin-screen-orienta ...
- checkbox与文字混排无法对齐到一行的解决办法
直接上代码: <span><input style="vertical-align:middle" type="checkbox" name= ...
- 03-Servlet 体系结构知识梳理
一.Servlet体系结构 Java Web应用是基于Servlet规范运行,Servlet顶层类的关联如下图: 从图可看出,Servlet规范基本围绕这几个类运行,其中,与Servlet主动关联的有 ...
- 将MongoDB服务器设置成Windows启动服务(win10)
如题,这个问题也百度了很久,百度还是挺给力的,但是都没能解决问题,后来在大神(原谅我不知道大神叫什么)的指导下,终于设置成功,特分享下设置过程.. MongoDB设置数据库我就不说了...额..算了, ...