小牛软件之家程序员

ftp服务器安装-Linux-Ubuntu

2017-03-30  本文已影响30人  慕凌峰

FTP (File Transfer Protocol) is probably the most popular method of uploading files to a server; a wide array of FTP servers, such as vsftpd, and clients exist for every platform.
Pre-Flight Check
These instructions are intended specifically for installing the vsfptd on Ubuntu 14.04 LTS.
I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server, and I’ll be logged in as root.

apt-get update

Then let’s install vsftpd and any required packages:

apt-get -y install vsftpd

vim /etc/vsftpd.conf

Disallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:

anonymous_enable=NO

Allow local uses to login by changing the local_enable setting to YES:

local_enable=YES

If you want local user to be able to write to a directory, then change the write_enable setting to YES:

write_enable=YES

Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_usersetting to YES:

chroot_local_user=YES

Exit and save the file with the command :wq.
Restart the vsftpd service:

service vsftpd restart

chmod a-w /home/user2/

Make a new directory for uploading files:

mkdir /home/user2/files
chown user2:user2 /home/user2/files/

上一篇 下一篇

猜你喜欢

热点阅读