1. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Next Door
    Rep Power

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


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

    cd /home gives me something like this:
    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
    Pennsylvania, USA
    Rep Power
    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
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    This is one way to do it:

    Here are more ways:

    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 05: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