Find the answer to your Linux question:
Results 1 to 4 of 4
How do I restrict ftp users to their home directory? I don't want users to go back to the root directory... just the directory that they ftp to. And also, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    20

    How to restrict ftp users to their home directory


    How do I restrict ftp users to their home directory?
    I don't want users to go back to the root directory... just the directory that they ftp to. And also, how can I change the directory that they ftp to?

    Thanks

  2. #2
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175
    You need to set up a chroot environment. Do you want them to use FTP or SFTP or SCP? If you want to restrict them to using only secure file transfer (scp or sftp) then you can use RSSH as their shell as well. That is typically what I do. High-level overview of a chroot environment is setting the shell to know that it is chrooted and what that directory is (e.g. /home) and then copy the binaries and the lib files in to that directory. Do you need a walk through for this? If so, what shell are you going to have them use.

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    20
    I'm using vsftpd... is that secure? can it be used on ssh? also, I already figured out how to chroot jail them in their home directory, is there a way to give them extra access to other specified directories?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175
    Those directories need to be below the jail in the file tree. If you chroot you can't move past that directory because you have created a new root directory for that user. Anything below /home/ would work, but if you wanted /var/www you couldn't do that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •