Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm looking for a solution to restrict access to directorys. I've a bunch of clients and each of them should be allowed to view only his own directory. But he needs to have (read) access to the global directory. And this driving me nuts...

I can easily restrict each client folder seperatly but if i do that the client will have no longer access to the global dir.

The global dir contains following:

This is how my directory structure looks like:

    www (DocumentRoot)
        - global
        - client #1
            - folder 1
            - folder 2
            - folder 3
        - client #2
            - folder 1
            - folder 2
            - folder 3
        - client #3
            - folder 1
            - folder 2

Outside of my document root i've a folder which contains my .htpasswd and my .htgroups.

Any suggsetions?

share|improve this question

Look at the Apache documentation at

Basically, you would be using "Require user" or "Require group" for each Location or Directory, depending on how you've set up the users for each client. For the Global directory, you could just require an authenticated user.

share|improve this answer
Do you have an hint how to require an (any) authenticated user? Could find nothing in the documentation... – gearsdigital Apr 5 '12 at 13:42
@gearsdigital "Require valid-user". Look at – cjc Apr 5 '12 at 14:25

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.