CẤU HÌNH FTP SERVER TRÊN CENTOS 6.0 VỚI VSFTPD

Post new topic   Reply to topic

View previous topic View next topic Go down

CẤU HÌNH FTP SERVER TRÊN CENTOS 6.0 VỚI VSFTPD

Post  chantroitinhoc on Sat Sep 24, 2011 1:05 am

1. Cài đặt vsftpd:

[root@dns ~]# yum -y install vsftpd


2. Cấu hình cơ bản trên vsftpd.conf:

[root@dns ~]# vi /etc/vsftpd/vsftpd.conf

Code:
# line 12: Không cho đăng nhập anonymous

anonymous_enable=NO

# line 80,81: Bỏ dấu comment ( allow ascii mode )

ascii_upload_enable=YES
ascii_download_enable=YES

# line 95, 96: Bỏ dấu comment để enable chroot

chroot_local_user=YES
chroot_list_enable=YES

# line 98: Bỏ dấu comment để chỉ định danh chroot_list các user được truy cập ftp

chroot_list_file=/etc/vsftpd/chroot_list

# line 104: Bỏ dấu comment để bật tính năng recurse

ls_recurse_enable=YES

# Thêm vào cuối file các dòng dưới đây
# specify root directory ( if don't specify, users' home directory become FTP home directory)

local_root=public_html

# use localtime

use_localtime=YES


3. Tạo tập tin chroot_list và add các user để truy cập ftp:

a. Tạo user để test truy cập ftp:

[root@dns ~]# useradd ftpuser
[root@dns ~]# passwd ftpuser

b. Tạo file chroot_list:

[root@dns ~]# vi /etc/vsftpd/chroot_list

Code:

# Thêm user vừa tạo vào file chroot_list để cho phép truy cập đến home directory của user ftpuser

ftpuser



4. Khởi động dịch vụ vsftpd:

[root@dns ~]# /etc/rc.d/init.d/vsftpd start

[root@dns ~]# chkconfig vsftpd on


5. Test dịch vụ ở máy client bằng chương trình FileZilla:

Bạn nhập địa chỉ hoặc tên miền của máy FTPServer, username, password và port 22 để truy cập ftp như hình bên dưới:




@: Các bạn có thể tham khảo thêm ở phần video demo ở chuyên mục Video Cấu hình hệ thống mạng trên CentOS 6.0


chantroitinhoc
Admin

Posts: 126
Join date: 2008-01-16

View user profile http://chantroitinhoc.niceboard.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You can reply to topics in this forum