Find the answer to your Linux question:
Results 1 to 4 of 4
Hello all, I have a server where users are able to ssh on it under their /home directory but they are also able to cd/ls in any other /home/* directory ...
  1. #1
    Just Joined!
    Join Date
    Dec 2003
    Location
    Greece
    Posts
    43

    Disable view access on /home

    Hello all,

    I have a server where users are able to ssh on it under their /home directory but they are also able to cd/ls in any other /home/* directory and view other users files.
    Can anyone point me how to remove that.
    I need users to be able to read/write/view only their directory.

    I can achieve that by doing a chmod 700 on users home directory but then I'm having troubles with Samba and LDAP.

    Thanks

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    remove read access from group and others.
    Code:
    chmod 700 /home/<user>
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux User IsaacKuo's Avatar
    Join Date
    Feb 2005
    Location
    Baton Rouge, LA, USA
    Posts
    292
    What sort of SAMBA and LDAP issues do you have with chmod 700? If you need some other users (like particular daemons) to have read access, then you need to learn about using groups.

    You'll need to do something like:

    addgroup homereaders
    chmod 750 /home/*
    chgrp homereaders /home/*

    This will create a new group called "homereaders", and will give any members of the "homereaders" group read access to the home directories. Next, you'll need to edit /etc/group to add particular users to "homereaders"--a list of users seperated by commas on the "homereaders" line. Note that you do not need to add any regular users to the homereaders group; every regular user already has full access to his own home directory.
    Isaac Kuo, ICQ 29055726 or Yahoo mechdan

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by asmar
    I can achieve that by doing a chmod 700 on users home directory but then I'm having troubles with Samba and LDAP.
    well well !! i am pretty sure that you have added this line after my post.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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