Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I'm using the SFTP from ssh server to make my connections to my Debian linux 6.0. I've created a new user with a goal of manage a single server, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2012
    Posts
    117

    SFTP Directories


    Hello,

    I'm using the SFTP from ssh server to make my connections to my Debian linux 6.0. I've created a new user with a goal of manage a single server, GTA. So on the creation I defined his home directory as /home/gta, BUT the user can simply do cd.. and his out of that folder and he can navigate through all the server directories. How can I block this use to navigate ONLY in his home directory?

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,639
    Have a read through this for some solutions. I would use the ChrootDirectory approach as a first try.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    3
    When I set up my file server I used ChrootDirectory (with only SFTP access - no shell login), as elija suggested, by following the steps on this page:

    h t t p : / / w w w .thegeekstuff.com/2012/03/chroot-sftp-setup/

    I did things a little differently, though. The instructions on that page use a separate directory for the SFTP users, but I wanted to keep the user directories in /home, so I gave /home root:root user/group ownership and the individual home directories have $USER:sftpusers user/group ownership.

  4. $spacer_open
    $spacer_close

Posting Permissions

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