Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Security»How to Configure Chroot Jail in VSFTPD

    How to Configure Chroot Jail in VSFTPD

    RahulBy 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..

    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
    Previous ArticleHow to Find Installed Package Details on Ubuntu and LinuxMint
    Next Article How to Edit Magento Database Configuration File

    Related Posts

    How to Install and Configure Fail2ban on Debian 11

    3 Mins Read

    How to Create SFTP Only User in Debian 11

    Updated:September 26, 20214 Mins Read

    How To Set Up SSH Keys in Linux

    5 Mins Read

    How To Secure SSH Server

    Updated:July 24, 20215 Mins Read

    How To Setup FTP Server with VSFTPD on Ubuntu 20.04

    Updated:July 15, 20215 Mins Read

    Chattr Command in Linux with Examples

    Updated:July 10, 20213 Mins Read

    2 Comments

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

      Thanks so much! This was incredibly helpful…..

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

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

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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