#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171

    How to give access to a user for a specific folder on dedicated


    Hi;

    I connect to server like ssh root@105...

    cd /home gives me something like this:
    site_one
    site_two
    Then cd site_one, then cd public_html, then ls gives me a list of all folders on that folder.

    I have 2 questions here:

    1 - How can I give access ONLY to a specific directory on public_html for a user?

    2 - How can I log in to the server as that user?

    I created a user and trued logging in with user@105.333..... and password, it says permission denied!

    I want to be able to log in and have ONLY limited access to that folder.

    Thank you
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6352
    Moved to linux help.

    Each folder has its own permissions. You can chown and chgrp to change the owner/group for a specific folder or file.

    You log in to the server using SSH or whatever other connection methods you've established.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    This is one way to do it:
    http://www.serverubuntu.it/SFTP-chroot

    Here are more ways:
    http://www.debian.org/doc/manuals/se...sh-env.en.html

    You can find more ways for your own distro by googling for "ssh chroot your_distro_name"
    Last edited by Scorpions4ever; October 8th, 2013 at 06:26 PM.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo