Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7651373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:29:22+00:00 2026-05-31T11:29:22+00:00

I am trying a achieve the following with htacess : ** adminuser ** /dir

  • 0

I am trying a achieve the following with htacess :

** adminuser **

/dir  <= has access to directory listing or parent dir
/dir/subdir-n  <= has access to directory listing of any sub-dir

** clientuser **

/dir  <= DOES NOT have access to directory listing or parent dir (preferably Directory Index that points to a blank index.html file)
/dir/subdir-n  <= has access to directory listing of any sub-dir

Basically we want our administrator to have be able to see all the list of sub dirs with an admin login and our individual clients to only be able to see their directory which we will communicate to them but all with the same login name.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:29:23+00:00Added an answer on May 31, 2026 at 11:29 am

    This should be possible with different htpasswd files for the different subdirectories.

    For the adminuser you make a login:pw pair and in /dir you require a auth user from the file that has ONLY your adminuser login:pw.

    For the clientuser you make a login:pw pair for that user, and append the adminuser login:pw pair on a new line in the same .htpasswd file for THAT directory.

    This way, your adminuser can look all dirs, while clientusers can only look their own dirs.

    To clarify, here is the files you’d have:

    /dir
    /subdiruser1
    /subdiruser1/.htaccess
    ...
    /.htaccess
    /.htpasswdadmin
    /.htpasswduser1
    

    In .htpasswdadmin you’d have one line:

    admin:weofj2p8jöeoif2p84

    In .htpasswduser1 you’d have two lines:

    user1:we2pr832urp823rpup
    admin:weofj2p8jöeoif2p84
    

    Note that your htpasswd files can be any name, but preferably start with .ht as many apache configs block web access to files name like that. Furthermore, you should not, as in my example, have your .htpasswd files accessible in the webroot, but rather keep them in a folder unaccessible from the web. And one last note: Obviously you see the limitations of that, when needing to change or add a new admin password requires you to add that login:pw pair to all the subdir .htpasswd files.

    If anyone has a better solution to this, I would be very curious.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to achieve the following without using sub query. For a funding,
I suck at htaccess and trying to achieve the following set of redirections. Any
I'm trying to achieve the following : when user is trying to access user1.domain.com
I'm trying to achieve following: class A { def foo() { foo } }
I am trying to achieve the following: <Style TargetType=ListBoxItem> <Setter Property=ContextMenu> <Setter.Value> <ContextMenu> <MenuItem
I am trying to achieve the following... _4S.NJB_Request request = (from r in db.NJB_Requests
I am trying to achieve the same behavior as indicated in the following post.
What I am trying to achieve is a form that has a button on
im trying to achieve the following, in php i have a form like this:
I'm trying to achieve the following goal: Using this general singleton class: abstract class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.