在Ubuntu 14.04 上安装 FTP 服务
2017-08-07 16:49
429 查看
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.
In this example, rather than removing write privileges from the home directory, we're will create an
Create the
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
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.
vsftpdaccomplishes this with
chrootjails. When
chrootis enabled for local users, they are restricted to their home directory by default. However, because of the way
vsftpdsecures 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
chrootand a writable
filesdirectory to hold the actual files.
Create the
ftpfolder, 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
相关文章推荐
- ubuntu14.04 server ftp 服务安装配置详解
- ubuntu14.04 server ftp 服务安装配置详解
- 在Ubuntu 14.04 16.04下搭建FTP服务,安装Filezilla客户端
- linux开发环境搭建-----ubuntu14.04安装 配置FTP SSH NFS 服务
- Ubuntu14.04安装和配置FTP服务
- ubuntu 14.04 安装设置ssh远程连接服务
- ubuntu14.04 安装ssh服务
- Ubuntu 14.04 安装ftp
- ubuntu 下安装、配置、启动FTP服务、SSH服务
- Ubuntu 14.04 FTP服务器--vsftpd的安装和配置
- Ubuntu 14.04 FTP服务器--vsftpd的安装和配置
- Ubuntu 14.04 FTP服务器--vsftpd的安装和配置
- Ubuntu Server 安装 FTP 服务 和 SSH 服务
- Ubuntu 14.04 FTP服务器--vsftpd的安装和配置
- ubuntu 下ftp服务的安装与启动
- Ubuntu下安装FTP服务
- ubuntu 下ftp服务的安装与启动
- ubuntu14.04安装ssh服务
- Ubuntu14.04 下安装Samba服务
- 在Ubuntu 14.04上安装搭建FTP服务器详解