Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    45
    Plugin Contributions
    0

    Default Pub Directory Access

    Hello there, I have re-direct on, and downloads are working well and expiring when they're supposed to, within the account itself...

    However, I noticed that at least for a Mac user, clicking on the Download button, a music download is now opening to a Quicktime page for them to do a Save As. That would be fine, except that a link to the file within the "pub" folder appears in the address bar, and I'm finding that this link could theoretically be shared with others, which seems to defeat the purpose of my using link redirect.

    Is there anyway to prevent this pub link from working for more than the number of download allowances? I have tried setting permissions for the pub directory at both 755 and also 777, as I've seen in two different sets of Zen documentation, but neither prevents this from occurring.

    In lieu of a solution for that, then I'm wondering if there's a quick way to see what downloads have already been used and perhaps trigger that particular encrypted link to "disconnect" from the file permanently?

    Thank you....

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Pub Directory Access

    There's an automated cleanup: The randomized filename link in the pub folder is deleted the next time someone clicks to download their merchandise.

    If you would prefer to make no link ever get used, turn off redirect and turn on streaming. This will put the burden on PHP instead of Apache, and limit your downloads to whatever max runtime is available on your PHP setup (usually 30 seconds), but will send the file directly without using a "link". This method has its pros and cons depending on server configuration and the size of files you're downloading.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Pub Directory Access

    Thanks for the quick reply, Dr. Byte...

    I found that even though the Download link would expire within the account, if someone had already copied the long pub link when they first accessed the file and say, sent it to another person, that same link would still work long after the download expired.

    I will look into the streaming option and weigh those pros and cons. I have zip files that are as much as 200 MB, so we'll see!

    My concern is less about full-on theft of files than it is, say, someone posting the pub link somewhere, drawing on bandwidth.

    I'll keep doing some tests, cause I'm not sure if that link works, because it's being used by an Admin IP. I'll give the a link to someone else and see if they're able to access it.

    This still was a big help, though! Thank you!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Pub Directory Access

    Quote Originally Posted by vivaknievel View Post
    I found that even though the Download link would expire within the account, if someone had already copied the long pub link when they first accessed the file and say, sent it to another person, that same link would still work long after the download expired.
    The old links will be invalidated the next time someone does a download by clicking on the download link in their order.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 2 Jan 2012, 09:05 PM
  2. Can't access admin or even shop directory
    By Destroyer in forum General Questions
    Replies: 14
    Last Post: 10 Nov 2010, 09:42 PM
  3. Giving access to a directory
    By phillip_r in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 12 Apr 2009, 07:52 AM
  4. /pub directory behavior
    By hollygds in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 25 Feb 2008, 01:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg