Kamis, 01 Desember 2011

INSTALLASI VSFTPD PADA CENTOS SERVER 5.3

Ya udahlah tanpa basa-basi dan banyak cincong ,nih berikut settingan konfigurasi pada saat saya menginstall ftp server pada server saya , cekidot :
1. Langkah pertama Instalasi Paket vsftpd nya terlebih dahulu dengan menggunakan perintah yum
[root@my-centos]# yum install vsftpd
2. Lalu Konfigurasi file vsftpd.conf nya
[root@my-centos]# vim /etc/vsftpd/vsftpd.conf
Yang perlu dirubah adalah:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to FTP Server K-Place.
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

3. Kemudian buat user lokal dengan nama ozotmacho
[root@my-centos]# adduser rivkhi
[root@my-centos]# passwd rivkhi
Changing password for user rivkhi.
New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
4. Membuat file chroot_list
File ini berisi daftar user yang bisa mengakses FTP server.
[root@my-centos]# vim /etc/vsftpd/chroot_list
Isinya adalah :
rivkhi
5. Restart Service FTP
[root@my-centos]# service vsftpd restart
[root@my-centos]# chkconfig vsftpd on
6. Cek konfigurasi FTP
[root@my-centos]# getsebool -a | grep ftp
nah dibagian ini saya mendapatkan status : getsebool: SELinux is disabled
maka untuk mengatasi hal tersebut saya edit file :
[root@my-centos]# vi /etc/selinux/config
dimana sebelumnya filenya :
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=disable
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
saya edit menjadi :
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=permisive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted

lalu aku reboot komputernya. Setelah komputer di reboot aku jalan kembali command :
[root@my-centos]# getsebool -a | grep ftp
allow_ftpd_anon_write –> off
allow_ftpd_full_access –> off
allow_ftpd_use_cifs –> off
allow_ftpd_use_nfs –> off
allow_tftp_anon_write –> off
ftp_home_dir –> on
ftpd_disable_trans –> off
ftpd_is_daemon –> on
httpd_enable_ftp_server –> off
tftpd_disable_trans –> off

apabila ftp_home_dir masih berstatus off, maka jalankan perintah :
[root@lmy-centos]# setsebool -P ftp_home_dir on
[root@my-centos]# iptables –F
 [root@bluebox ~]# setsebool -P allow_ftpd_full_access on
Sekian dulu dah postingan dari saya, soalnya mata udah berat banget mau di shutdown dulu

Tidak ada komentar:

Posting Komentar