Konfigurasi FTP SERVER pada centOS
suatu saya sedang PKL saya di suruh mengkonfigurasi FTP SERVER di centOS. awalnya saya bingung karena saya belum pernah mengkonfigurasi FTP SERVER dan saya juga belum bisa menggunakan centOS tanpa GUI (tanpa grafik).
kemudian saya browsing di internet untuk mencari caranya. Nah akhirnya saya mendapatkan tutorialnya tetapi saya masih bingung karena saya belum mengetahui perintah-perintah dasar pada centOS. Tetapi saya terus mencoba sampai BERHASIL.
Langsung aja kita ke pokok materinya niih...
SELAMAT MENCOBA
BY : ARDY SMART
gin: http://adsensecamp.com/ -->
kemudian saya browsing di internet untuk mencari caranya. Nah akhirnya saya mendapatkan tutorialnya tetapi saya masih bingung karena saya belum mengetahui perintah-perintah dasar pada centOS. Tetapi saya terus mencoba sampai BERHASIL.
Langsung aja kita ke pokok materinya niih...
- Pastikan paket vsftpd telah terinstall dalam komputer anda, atau ketikan (harus terkoneksi internet)
- Kemudian konfigurasikan file
- kemudian edit potongan konfigurasi menjadi seperti ini.
- Jika sudah simpan hasil perubahan dengan ESC:wq
- Kemudian restart lah service dari vsftpd
- Kemudian buat user lokal dengan nama ardyftp (unuk nama user bebas)
- Kemudian buat password
- Membuat file chroot_list
- Restart Service FTP
- Cek konfigurasi FTP
- Kemudian reboot komputer dengan perintah #shutdown -r now setelah komputer di reboot jalankan kenbali command :
- gunakan aplikasi FTP client seperti GFTP, FILEZILA atau WINSCP untuk login dan mengupload / download file di server
- gunakan BROWSER jika ingin mendownload saja, tanpa upload
[root@ardysmart]# yum install vsftpd |
[root@ardysmart]#/etc/vsftp/vsftpd.conf |
# Example config file /etc/vsftpd/vsftpd.conf
# # The default compiled in settings are fairly paranoid.
This sample file
# loosens things up a bit, to make the ftp daemon more
usable.
# Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive list
of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full
idea of vsftpd’s
# capabilities. # # Allow anonymous FTP? (Beware – allowed by default if you
comment this out).
anonymous_enable=NO # # Uncomment this to allow local users to log in. local_enable=YES # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to
change this to 022,
# if your users expect that (022 is used by most other
ftpd’s)
local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload
files. This only
# has an effect if the above global write enable is
activated. Also, you will
# obviously need to create a directory writable by the FTP
user.
#anon_upload_enable=YES # # Uncomment this if you want the anonymous FTP user to be
able to create
users when they# new directories. #anon_mkdir_write_enable=YES # # Activate directory messages – messages given to remote # go into a certain directory. dirmessage_enable=YES # # Activate logging of uploads/downloads. xferlog_enable=YES # |
[root@ardysmart]# service vsftpd restart |
[root@ardysmart]# adduser ardyftp |
[root@ardysmart]# passwd ardyftp |
Changing password for user ozotmacho. New UNIX password:******** BAD PASSWORD: it is too simplistic/systematic Retype new UNIX password:******** passwd: all authentication tokens updated successfully. |
[root@ardysmart]# vim /etc/vsftpd/chroot_list |
ardyftp
[root@ardysmart]# service vsftpd restart |
[root@ardysmart]# chkconfig vsftpd on |
[root@ardysmart]# getsebool -a | grep ftp |
[root@ardysmart]# vi /etc/selinux/config |
# 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 |
# 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 |
[root@ardysmart]# 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 –> offftpd_is_daemon –> on httpd_enable_ftp_server –> off tftpd_disable_trans –> off |
[root@ardysmart]# setsebool -P ftp_home_dir on |
[root@ardysmart]# iptables -F |
SELAMAT MENCOBA
BY : ARDY SMART
KOMENT YA....
BalasHapus