Skip to Content Skip to Menu

[SOLVED] Folder access not working

  • UniMult
  • UniMult
  • OFFLINE
  • Posts: 38
  • Thanks: 3
  • Karma: 0
8 years 8 months ago - 8 years 5 months ago #279002 by UniMult
[SOLVED] Folder access not working was created by UniMult
I am trying to restrict a download folder for subscribers only. I setup my plan with folder access with the following: folder: /folder type: Joomla

I created a new user with the plan and the files .htaccess and .htpasswd are created in /folder and .htpasswd does contain the new user info.

However, when I log in as the new user and click on the button to start the download, a "Folder Restriction" message appears with a login box. Even if I enter the new user info in this login, I still can't access the folder.

I thought that if a subscriber logged in, they would have access to the folder without additional login process - am I right?

How do I setup the folder access to work correctly?

Thanks
Last edit: 8 years 5 months ago by beat. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • UniMult
  • UniMult
  • OFFLINE
  • Posts: 38
  • Thanks: 3
  • Karma: 0
8 years 8 months ago #279302 by UniMult
Replied by UniMult on topic Folder access not working
*** UPDATE ***

I can verify that my .htaccess and .htpasswd files are working when I create a user in the .htpasswd file and enter the proper username and password when I directly browse to the .html file in the folder.

When I create a new user with a plan that can access the folder from my website, a .htaccess and .htpasswd files are created in the proper folder. However, when I login into the site as the new subscriber and try to access the .html file in the protected folder, I am prompted to login and I am never able to get pass this screen.

Any help on setting up a protected download folder based on subscribed plan is very much appreciated.

Thanks

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 8 months ago #279320 by nant
Replied by nant on topic Folder access not working

UniMult wrote: *** UPDATE ***

I can verify that my .htaccess and .htpasswd files are working when I create a user in the .htpasswd file and enter the proper username and password when I directly browse to the .html file in the folder.

When I create a new user with a plan that can access the folder from my website, a .htaccess and .htpasswd files are created in the proper folder. However, when I login into the site as the new subscriber and try to access the .html file in the protected folder, I am prompted to login and I am never able to get pass this screen.

Any help on setting up a protected download folder based on subscribed plan is very much appreciated.

Thanks


Joomla version?
CB Version?
CBSubs version?

Have you read the manual sections 6.11 and 7.5.6.10 ?

Please Log in or Create an account to join the conversation.

  • UniMult
  • UniMult
  • OFFLINE
  • Posts: 38
  • Thanks: 3
  • Karma: 0
8 years 8 months ago #279351 by UniMult
Replied by UniMult on topic Folder access not working
Joomla - Joomla! 3.4.8 Stable
CB - 2.0.13
CBSubs - 4.0.1
Apache Server

Yes, I did review the Folder Access plugin installation and the how to setup the integation. The htaccess and htpasswd files are being created in the correct folder by CBsubs

After doing much testing, here is the problem. The htpasswd file is being changed by logging in process. Here is how to reproduce:

1) create new user
2) confirm htaccess and htpasswd files are created in proper folder
3) confirm user subscription by clicking on link in email
4) save htpasswd
5) log in as new user
6) save htpasswd
7) compare the two htpasswd files and notice that they are different

This change prevents the user from accessing the folder.

Here is what the files look like:

Right after new user confirmation:
erictest:$1$VhfYHXmi$oW1a2dpyzCXa1KmGI3DXH/

Right after logging in as new user:
erictest:$L5roRPMsY2LOGXpYpkSLeAuZ9WwK1
The following user(s) said Thank You: beat

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
8 years 8 months ago #279376 by beat
Replied by beat on topic Folder access not working
Thanks for your detailed report.

It has allowed me to reproduce the bug you experienced and to fix it.

Fix will be available in tomorrow's nightly and upcoming CBSubs 4.0.2 release. Make sure to also install CBSubs Folder Protect integration CB plugin.

#5857

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: nant, UniMult

Please Log in or Create an account to join the conversation.

  • UniMult
  • UniMult
  • OFFLINE
  • Posts: 38
  • Thanks: 3
  • Karma: 0
8 years 8 months ago #279389 by UniMult
Replied by UniMult on topic Folder access not working
Thanks for working on it so quickly.

Question: If a subscriber becomes expired, does CBSubs remove the user from the htpasswd file to prevent direct browser access for this user?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum