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

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 .