how to restrict user to only one dir in Vsftpd?

Issues related to configuring your network
Post Reply
ranafaisal
Posts: 1
Joined: 2018/05/16 06:22:38

how to restrict user to only one dir in Vsftpd?

Post by ranafaisal » 2018/05/16 06:32:53

I have configured vsftpd and chroot'ed the user but than I want him to restrict him to just say Desktop dir or some other dir. my vsftpd configuration is as follows:
# line 12: no anonymous
anonymous_enable=NO
# line 82,83: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
# line 100, 101: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES
# line 103: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd/chroot_list
# line 109: uncomment
ls_recurse_enable=YES
# line 114: change ( if use IPv4 )
listen=YES
# line 123: change ( turn to OFF if it's not need )
listen_ipv6=NO
# add follows to the end
# specify root directory ( if don't specify, users' home directory become FTP home directory)
local_root=public_html
# use localtime
use_localtime=YES
# turn off for seccomp filter ( if you cannot login, add this line )
seccomp_sandbox=NO
[root@www ~]# vi /etc/vsftpd/chroot_list
# add users you allow to move over their home directory
cent
[root@www ~]# systemctl start vsftpd
[root@www ~]# systemctl enable vsftpd
[root@dlp ~]# firewall-cmd --add-service=ftp --permanent
success
[root@dlp ~]# firewall-cmd --reload
success
[root@dlp ~]# setsebool -P ftpd_full_access on

Post Reply