0

I have implemented openLDAP logging into my test server, each user has its own folder, which should be private for him.

Now I have testUser1, testUser2 and testUser3, that means my /home/ folder contains folders:

  • testUser1_folder
  • testUser2_folder
  • testUser3_folder

Is there any way how to define, that testUser1_folder can be accessible only by root or testUser1?

Thanks a lot

3
  • 1
    Do you mean change permissions after creating the folders by hand, or automatically when the users are created? Both questions are very rtfmish. Commented Nov 13, 2012 at 10:37
  • I will, as a root, create theese folder by hand. But I don't know, how to assign to folders, they can be read only by certain users
    – Waypoint
    Commented Nov 13, 2012 at 10:45
  • I think you can make do without ACLs, but here is a possible solution: superuser.com/questions/144984/… Commented Nov 13, 2012 at 11:18

2 Answers 2

1

Put this into your search engine of choice: "how manipulate folder ownership permissions unix"

you will find:

chown -R userY:grouX DIR - will change the ownership or a folder tree under DIR
chmod 750 DIR - will allow only users from groupX and userY to open DIR.

If you prefer technical documentation to google, there is man chmod and man chown.

1

To change the directories you gave in your example type the following:

$ sudo chown -R testuser1:testuser1 /home/testUser1
$ sudo chown -R testuser2:testuser2 /home/testUser2
$ sudo chown -R testuser3:testuser3 /home/testUser3

Note this is basic unix/linux stuff, you might want to read some tutorials online or an Oreilly book like "Linux in a nutshell":

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .