Page 1 of 1

URI Files Not Protected

PostPosted: June 6th, 2011, 7:11 pm
by mikesmind
I have a URI setup to restrict some documents to Level 0 access.

Here is an example:
/TestPath/

When logged out, I can access resources in the subfolders of the TestPath folder. I don't have any documents in the TestPath folder.

Here's an example (not a real URL):

http://testwebsite.com/TestPath/Contact ... 20List.pdf

How do I diagnose or fix this problem?

Thanks, Mike

Re: URI Files Not Protected

PostPosted: June 6th, 2011, 7:45 pm
by Cristián Lávaque
The URI Restriction will work with things under WordPress' control. If that's a directory in your server that doesn't have to do with WordPress, then s2Member won't manage the access to it.

Re: URI Files Not Protected

PostPosted: June 7th, 2011, 6:24 am
by mikesmind
How do I secure resources that are downloaded, if someone figures out the path?

Re: URI Files Not Protected

PostPosted: June 7th, 2011, 7:44 am
by mannclann
Use an .htaccess file or a simple blank index.htm file so that nothing in the directory can be seen

Re: URI Files Not Protected

PostPosted: June 7th, 2011, 8:26 am
by mikesmind
If I use a .htaccess file, will that allow access if the link is clicked on in WordPress, but not allow access if the actual URL is used in browser?

If I use a blank index.htm file, will that still allow access for the actual full path url used in the browser?

Thanks, Mike

Re: URI Files Not Protected

PostPosted: June 7th, 2011, 8:59 am
by mannclann
If I use a .htaccess file, will that allow access if the link is clicked on in WordPress, but not allow access if the actual URL is used in browser?

I am not an expert with htaccess, I always have to research to get it right. I believe that the only way you could do what you want is with some kind of script (pearl, cgi).

If I use a blank index.htm file, will that still allow access for the actual full path url used in the browser?

If someone knows the exact url including filename then they could access the file

Maybe the easiest way for you is to use the advanced download feature (if you are using the pro version) and then just put your directory within the wordpress structure.

Rick

Re: URI Files Not Protected

PostPosted: June 7th, 2011, 12:09 pm
by Cristián Lávaque
You can use s2Member's Download Options to protect files you place in the directory s2Member uses for this. The documentation is found here WP Admin -> s2Member -> Download Options.

mannclann wrote:use the advanced download feature (if you are using the pro version)


s2Member's Advanced Download Restriction is available in s2Member Free.

Re: URI Files Not Protected

PostPosted: June 18th, 2011, 2:55 pm
by mikesmind
Thanks Cristián! The directory that Download Options uses works great.

Is there a way to have sub-directories in this directory to better organize content? I tested a couple of different ways but couldn't get a sub-directory to work.

Thanks, Mike

Re: URI Files Not Protected

PostPosted: June 18th, 2011, 11:05 pm
by Cristián Lávaque
I think you can use subdirectories, just remember to add them to the file path in the download link. I know that there are special subdirs for level and custom capability restrictions, but you can try other ones and see if they work too. WP Admin -> s2Member -> API / Scripting / Custom Capability & Member Level Files

In case you haven't watched it yet, here's a video on s2Member's download protection http://www.s2member.com/file-download-options-video/