Results 1 to 3 of 3

Thread: Restrict access to home and or /var/www

  1. #1
    Join Date
    May 2012
    Beans
    1

    Restrict access to home and or /var/www

    Hi

    I'd like to set up a remote user that only has access to /var/www via ssh and sftp.

    Is this possible ? I can use something like rbash to lock a user in to the home directory (which I can then usermod to /var/www) - But I also want a similar sort of control for a user when they sftp into my machine. In particular I don't want them to be able to view the directory structure.

    I feel I'm close but I'm missing something with regard sftp.

    Thanks

    Stan

  2. #2
    Join Date
    Jan 2010
    Location
    Kolkata India
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Restrict access to home and or /var/www

    You can tweak the ftp configuration file to bar the user from wandering through different directories .
    Edit vsftpd.conf , make sure chroot_local_user=YES entry is uncommented .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  3. #3
    Join Date
    Jun 2011
    Beans
    357

    Re: Restrict access to home and or /var/www

    I think what you want is a chroot (jail) for SFTP connections. There is a tutorial on setting this up here:
    https://survivalguides.wordpress.com...tp-connection/

    Edit: this is probably a better explanation:
    http://www.debian-administration.org/articles/590
    Last edited by thnewguy; May 17th, 2012 at 03:20 AM.

Bookmarks

Posting Permissions

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