Restricting to web directory
Create user account with these parameters for xyz
Home Directory /home/xyz
home directory should be own by root:ftpusers with chmod 755
e.g permission of /home is root:ftpusers and chmod 755
Group : ftpusers is a group
Username : xyz is user account that needs be jailed. User account configuration :Create user account with these parameters for xyz
Home Directory /home/xyz
home directory should be own by root:ftpusers with chmod 755
e.g permission of /home is root:ftpusers and chmod 755
- permission of /home/xyz is root:ftpusers and chmod 755
- create a folder in /home/xyz/public_html
- permission of upload should be xyz:ftpusers and chmod 755
VSFTPD Config
connect_from_port_20=YES
pam_service_name=vsftpd
userlist_enable=YES
pasv_promiscuous=YES
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
chmod_enable=NO
cmds_allowed=ABOR,QUIT,LIST,PASV,RETR,CWD,STOR,TYPE,PWD,SIZE,NLST,PORT,SYST,PRET,MDTM,DEL,MKD,RMD,DELE
listen_port=9221
pasv_enable=YES
#pasv_addr_resolve=YES
pasv_min_port=5000
pasv_max_port=5020
SSHD Config
Subsystem sftp /usr/libexec/openssh/sftp-server
Match User pb_ftp
ChrootDirectory /home/xyz/public_html
X11Forwarding no
AllowTcpForwarding no
No comments:
Post a Comment