0

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: http://larsjung.de/h5ai/

This is how my directory structure looks like:

var
    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?

gearsdigital
  • 101
  • 1
  • 3

1 Answers1

1

Look at the Apache documentation at http://httpd.apache.org/docs/2.2/howto/auth.html

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.

cjc
  • 24,533
  • 2
  • 49
  • 69
  • Do you have an hint how to require an (any) authenticated user? Could find nothing in the documentation... – gearsdigital Apr 05 '12 at 13:42
  • @gearsdigital "Require valid-user". Look at http://wiki.apache.org/httpd/PasswordBasicAuth – cjc Apr 05 '12 at 14:25