Find the answer to your Linux question:
Results 1 to 4 of 4
I can set the ftp client so the user cannot go to upper directories. BUT, when they login into the server using ssh they can. How can I remove that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    20

    Permissions to change root


    I can set the ftp client so the user cannot go to upper directories. BUT, when they login into the server using ssh they can. How can I remove that ability?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,664
    Remove read/write/execute permissions on those directories from user Other. IE, "chmod o-rwx directory-list"
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    20
    Hmmm... are you sure? Perhaps I didn't explain it well...

    I meant that when someone uses ftp they can go to their /usr/home directory but they cannot see the /usr/, I want the same to happen if they use SSH.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,664
    Quote Originally Posted by pelf View Post
    Hmmm... are you sure? Perhaps I didn't explain it well...

    I meant that when someone uses ftp they can go to their /usr/home directory but they cannot see the /usr/, I want the same to happen if they use SSH.
    You can do that by setting the permissions on /home, so that users cannot access it. All system logins usually go to /home/user where "user" is the user id. SSH logins are no different from normal ones, and the user is placed into their home directory. /home usually is owned by root.root (root user and group). As long as the user doesn't have root group privileges, then they should be effectively shut out of /home. However, the question is whether or not they can log in at all! I did some testing on my system, and this may be a problem. Do some testing on your system.

    All that aside, you can make sure that each user directory in home is only accessible by that user, so even if they can "see" /home, they can't access other user directories and files.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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