Find the answer to your Linux question:
Results 1 to 4 of 4
I have userA with files and subdirectories: /home/userA /home/userA/subdir1, userA only has access to files in /home/userA/subdir1 and is not allowed to move to /home/userA or anywhere else. Similar for ...
  1. #1
    mjc
    mjc is offline
    Just Joined!
    Join Date
    Jul 2007
    Posts
    21

    Restrict viewing of files, subdirectories

    I have userA with files and subdirectories:
    /home/userA
    /home/userA/subdir1,

    userA only has access to files in /home/userA/subdir1 and is not allowed to move to /home/userA or anywhere else.

    Similar for user B, this user only has access to /home/userB/subdir1

    userC on the other hand is allowed to view contents of:
    /home/userA,
    /home/userA/subdir1
    /home/userB,
    /home/userb/subdir1
    /home/userC
    etc.

    My question, how do I set up permissions; either in the password file, chmod, or elsewhere?

    Thanks in advance

  2. #2
    Linux User abhishek456's Avatar
    Join Date
    Dec 2006
    Posts
    470
    you can use chmod to change file permissions

    Chmod tutorial

    the above link provides you a lot of information on using Chmod
    life is the greatest opportunity that the nature had given you

  3. #3
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Ft. Polk, LA
    Posts
    796
    This could be tough to accomplish, normally the user needs access to files in their home directory for configuration purposes. Also, to execute programs, that user will also need access to those programs. My thoughts are that if you don't already know how to do this, it's likely you'll be going in over your head if you want to limit users like this. But other than that, read up on the chmod man page.

  4. #4
    mjc
    mjc is offline
    Just Joined!
    Join Date
    Jul 2007
    Posts
    21
    I think I may have found a way; through their passwd file; I would jail them to /home/userA/subdir1 instead of /home/userA.

Posting Permissions

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