Folder Access Integration

6 years 10 months ago #294941 by neveryonas
Folder Access Integration was created by neveryonas
Joomla 3.7.2
CB Subs 4.1.0
CB 2.1.2

I have never gotten the Folder Access to work for me. Not sure if I am missing a key point in the set up.
I am trying to protect content under a folder called /magazine.
I created a test subscription and under Folder Access in Path 1->
  • set the path name to /magazine
  • set the Type to Joomla

Then created a test user with that subscription.
After logging in as the test user, I can see the entry in the htpasswrd file under the magazine folder. However when not logged in, the public can still view the direct URL to one of the files within the /magazine folder (ie. /magazine/issue_2017.html. There is no prompt to login.

I also attempted with type Absolute with not much better luck.

What I am doing wrong?

Please Log in to join the conversation.

6 years 10 months ago #294974 by krileon
Replied by krileon on topic Folder Access Integration
If the htaccess file and htpasswd files exist there's nothing more for CBSubs Folder Access to do. It essentially just generates those files in the specified directory and manages adding users to the htpasswd file. Your host needs to have apache with mod_auth_basic for it to work, but that shouldn't be an issue. Review the htaccess to see if there could be any issues in it. Note once you've been authorized for that folder in your current session your browser keeps that authentication. It's best to test in incognito mode for your browser so you can reliably retest.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 10 months ago #295064 by neveryonas
Replied by neveryonas on topic Folder Access Integration
Thanks. I tried it in incognito mode, and same thing.
When you say check the htaccess file..are you talking about the ones in the folder I am trying to protect?
There were two files added to the folder I am trying to protect

.htaccess
AuthName "none of your business"
AuthUserFile "/home2/mydomain/.htpasswds/public_html/magazine/passwd"
ErrorDocument 401 "Authorisation Required"


.htpasswrd

tester2345:{SHA}iMrvccX8UMQAxQmpH83iTEkH90k=
tester456:{SHA}iMrvccX8UMQAxQmpH83iTEkH90k=
tester456:{SHA}iMrvccX8UMQAxQmpH83iTEkH90k=

So it seems that it is doing what it is supposed to do.
The folder I am specifying in the subscription is http://mydomain/magazine

I set up a redirect on my server for the magazine folder when I found it was being indexed on Google, and anyone could be accessing the folder, that listed all the magazines that are part of a paid subscription.
Do you think this might be causing some issue?

Please Log in to join the conversation.

6 years 10 months ago #295065 by neveryonas
Replied by neveryonas on topic Folder Access Integration
Actually just noticing the folder path in the htaccess
/home2/mydomain/.htpasswds/public_html/magazine/passwd

I am seeing the .htpasswds file in the magazine folder.
The path is showing outside of the public_html folder..is that normal?

Please Log in to join the conversation.

6 years 10 months ago #295082 by krileon
Replied by krileon on topic Folder Access Integration
Your htaccess file does not look like it was generated by CBSubs Folder Access. Delete it then login with a user that should have access to that folder and it should generate the htaccess file. Next edit it and verify it's correct. The first line should be "AuthType Basic" and is also missing the "require valid-user" line. That htaccess appears to have been generated by your hosting panel or manually added.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.371 seconds

Facebook Twitter LinkedIn