Wednesday, 24 January 2018

Restrict Ftp user to access other directory

Please follow below steps :-

1. # yum update
2. Disable selinux(vi /etc/sysconfig/selinux) for check #sestatus
3.#service iptables stop
4.#useradd akash
5.#passwd akash
#################Now Install Ftp#############################
6.yum install vsftpd -y
7.service vsftpd resart
##################Make directory For user access##################################
8.mkdir /akash1
###############Create file For Chroot_Jail##################
9.  vi /etc/vsftpd/chroot_list (here write the user name and save and exit).
10. vi /etc/vsftpd/vsftpd.conf
Here we add one entry- local_root=/akash1 (You can write here your directory for access via ftp).
and
#chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
and do this than save and exit .
11.service vsftpd restart.

No comments:

Step-by-step OpenLDAP Installation and Configuration on server

This tutorial describes how to install and configure an OpenLDAP server and also an OpenLDAP client. Step by Step Installation and Conf...