Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Do you mean change permissions after creating the folders by hand, or automatically when the users are created? Both questions are very rtfmish. – Ярослав Рахматуллин Nov 13 '12 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 Nov 13 '12 at 10:45
I think you can make do without ACLs, but here is a possible solution:… – Ярослав Рахматуллин Nov 13 '12 at 11:18

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.

share|improve this answer

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":

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.