Path to download folder

Phoca Download - download manager
User avatar
akerman
Phoca Member
Phoca Member
Posts: 42
Joined: 07 Jul 2008, 18:42
Location: Sweden - Stockholm
Contact:

Path to download folder

Post by akerman »

Hi Jan,

... eh, first: Good job! It feels like we're now looking at a contender to DocMan. More modern and a little bit sleeker. Thank you for inserting quality extensions into the community! :)

Since I'm a sucker for security and issues in regards of intellectual property/immaterial rights I have an issue.

1. Can I modify the component to store the files in a folder above the WWW-root?

(DocMan does this as well as Gallery2 ... as we talked about before... :wink: )

No need for a full description, pointers where to start looking is sufficient.

Regards
Akerman
Last edited by akerman on 01 Dec 2008, 11:22, edited 5 times in total.
http://www.AkermansCove.com - CMS Addons! & Royalty Free Images
http://www.InfoClip.se - Swedish site for Practical knowledge.
Ubuntu LAMP / Joomla 1.5.8 / VM 1.1.2 Stable / JoomFish / Mosets Tree
/ Joomsuite / Phoca / JoomGallery /
User avatar
akerman
Phoca Member
Phoca Member
Posts: 42
Joined: 07 Jul 2008, 18:42
Location: Sweden - Stockholm
Contact:

Re: Path to download folder

Post by akerman »

Well, it just took me a couple of seconds to figure this one out. :D

Had a quick look at the components way to build the path and took some impressions from the threads in here, plus some knowledge about other J! template/extension combos.

Reason for doing this:
If you have images, designs, artwork, logotypes, music or video files that you want to sell (maybe professional photographer, designer, artist or musician) you really need to secure your intellectual property. It is after all your livelyhood. To place such property inside the WWW-root is the same as taking a risk of non-authorized downloads.

Placing of content inside/under the WWW-root is from a security perspective considered never to be safe. A website is per definition open to access. That's the way it's supposed to work. Network protocols, scripts and application calls are all able to connect to your site (everything under WWW-root). No matter the security you put on top of this, from a security standpoint a website is considered an open system.

The Cure:
Move sensitive files (in this case downloads) above the WWW-root. The access to this folder is not controlled by the Joomla! system. It is not accessible for any user via Internet. It is controlled by the operating system of the server.

So, can this nice Phoca Downloads component handle this? Yes it can!! :twisted:

1. Create an external folder outside (just above) your WWW-root (Ex. "secure_downloads")
In Linux/Apache the physical path looks like this /var/www/mysite/phocadownload to the
default Phoca Download file folder. In the config this is represented by just 'phocadownload', the rest
of the path is added by the component.

Enter your operating system or your host account and create the top-directory for your files
You now have a physical folder like this: /var/secure_downloads

2. In the component config (Settings/Download Folder);
change 'phocadownload' to " ../../secure_downloads"
(no citationmarks. don't forget dots n' slashes)


3. New folders inside this top folder/directory is then simply created in the component backend, as you normally do (Create the folder first in Files/New/files/Create Folder - Then download the file)

There is no issue with creating new folders inside this folder, via the component backend. But you need to create the first top folder/directory manually, as stated above.

Be well, be safe! :D

Regards
Akerman
http://www.AkermansCove.com - CMS Addons! & Royalty Free Images
http://www.InfoClip.se - Swedish site for Practical knowledge.
Ubuntu LAMP / Joomla 1.5.8 / VM 1.1.2 Stable / JoomFish / Mosets Tree
/ Joomsuite / Phoca / JoomGallery /
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Path to download folder

Post by Jan »

Great!!!

thank you for this guide, I will paste it into the FAQ....

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Path to download folder

Post by Jan »

sorry I don't understand: "how do I access this file in my content?"

Jan
If you find Phoca extensions useful, please support the project
Post Reply