Allowing users to view content of password-protected directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Hello everyone,

My website is hosted by a company using Apache 2.2.23. They offer, through cPanel, a simple functionality for password protecting a directory. This functionality creates an .htaccess file with the following lines of code:

AuthType Basic
AuthName "Subscriber-only Content"
require valid-user
AuthUserFile "/home/bankrup2/.htpasswds/public_html/subscribers/passwd"

My problem is that I want users who have logged in to the password-protected directory to be able to view a listing of the content of the directory and its subdirectories. None of the directories have index files, so under normal conditions, an attempt to access the directory would yielding a listing of the directory content.

However, the present coding (or my hosting company's configuration) does not allow that. An attempt to view http://www.cbar.pro/subscribers/ (the protected directory) yields the following error message, even when the user has logged in through password access:

403 Permission Denied
You do not have permission for this request /subscribers/

I have added the following two lines of code to the .htaccess file:

Options +Indexes
IndexOptions ShowForbidden

I have tried adding it to both the top and the bottom of the existing four lines of code, in case the order in which the commands are executed makes a difference. However, I still get the same error message.

I searched the archives and found a message asking the same question (Subject: Letting users see directory contents of protected directory) but the thread ended without a resolution.

I publish a newsletter, with access to the protected directory limited to subscribers, and I would very much like to allow subscribers to view the directory contents, as I have a lot of research files for them, and this would be another way they could access those files.

My hosting firm's setup allows the listing of directory content for directories that are not password-protected (and that don't have index files). You can view the directory content for http://www.cbar.pro/free/ So this is definitely being caused by the addition of the password protection.

Thank you for any help you can give me,
Robin Miller


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux