Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Security»How to Configure Chroot Jail in VSFTPD

    How to Configure Chroot Jail in VSFTPD

    By RahulJuly 11, 20152 Mins Read

    What is Chroot jail ?
    [ definition at wikipedia ]
    A chroot on Unix operating systems is an operation that changes the apparent disk root directory for the current running process. Read more about chroot and implementation..

    Advertisement

    Why use Chroot jail in VSFTPD ?
    Chroot jail is used for that any user login to ftp cannot access filesystem outside of its home directory. For example if chroot is not enabled and login to ftp server and try to access any location like /etc/httpd/conf for /etc directories.

    chroot-jail-disabled

    As per above screenshot, you can see a normal user ‘tecadmin’ can view the apache configuration files. Although you can go anywhere ( all directories ) in system.

    Enable Chroot Jail in VSFTPD

    To enable chroot jail in vsftp, Edit vsftp configuration file in your favorite editor

    # vim /etc/vsftpd/vsftpd.conf
    

    and un comment or add following entry in configuration file

    chroot_local_user=YES
    

    After adding above line, save file and restart vsftpd service.

    # service vsftpd restart
    

    Now your vsftp server has enabled chroot jail and all users has limited access to there home directory.
    Check the below screenshot created after enabling chroot jail and compare difference with old screenshot.

    chroot-jail-enabled

    You can see that now user ‘tecadmin’ has limited access to there home directory only.

    chroot chroot jail security vsftpd vsftpd security
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Firewalld: Common Firewall Rules and Commands

    How to block bad bots using .htaccess

    How to Open Port in Linux

    View 3 Comments

    3 Comments

    1. David on January 15, 2023 2:13 am

      does absolutely nothing. I have tried everything I can think of.

      Reply
    2. Jason on September 11, 2013 1:51 pm

      Thanks so much! This was incredibly helpful…..

      Reply
    3. Patrik on September 11, 2013 1:49 pm

      Very good info about security… thanks for sharing this article…..

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.