Support

Admin Tools

#14565 Creating a secure folder?

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Tuesday, 05 February 2013 18:00 CST

creotom

Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes, I can't find anything relating to my query.
Have I read the documentation before posting (which pages?)? Yes, but I'm a bit of a newbie and get confused easily.
Joomla! version: (2.5.8)
PHP version: (5.4.7)
MySQL version: (I don't know)
Host: (Woking on a local copy for now using xampp but will be hosted on dreamhost)
Admin Tools version: (2.4.4)

Description of my issue:

Please bare with me while I try and explain and forgive me if this is outside the scope of your support.

I have some data that I want to present in joomla that changes frequently.
These are price lists that I want to be able to control who has access to. (Not massively secret but I wish to have some level of protection.)Β I have experimented with a lot of ways of publishing this info but the easiest so far for me is the following procedure.
1. My accounting software generates html pages and supporting files to a folder
2. I upload this folder to images/spreadsheets/
3. Using a wrapper module and the load {loadposition module} plugin I can present the data in an article exactly as I want and with minimal effort.
4. To updadate this I simply upload the new files into the folder.

My problem is as follows:
Whilst the above procedure is perfect for me I have discovered that if someone has the direct address for the html file they can open it outside of joomla bypassing ACL. For example http://www.mysite.com/images/spreadsheets/pricelist.htm
IΒ have read your documentation and learned that the images folder and sub directories is excepted from much of the security that the other joomla folders possess. So I tried placing my files in a subdirectory of administrstor. But then when I view the article in joomla the module loads with a 403 error.Β 

Simply put I want to protect my uploaded html files from direct linking and still allow joomla to call on and present them.

Is this possible and can you tell me please what I need to do?

I have spent quite a bit of time reading about .htaccess files and have only succeeded in confusing myself.

My thanks in advance for your assistance.



nicholas
Akeeba Staff
Manager

Static files are served directly by Apache, without Joomla! (or even PHP) being loaded. This means that Apache cannot check Joomla!'s ACLs before serving a file. Therefore the solution is to use a download component for Joomla! like Phoca Download, DOCman and so on to limit which Joomla! users can download a file. The only problem is that all of those extensions are meant to serve the files using the attachment disposition which results in the browser downloading the file to the user's computer. To the best of my knowledge none of them can be configured to serve them with the inline disposition which would permit the browser to display the files inside, say, an IFrame.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

creotom

Ok I thought that this was something that could be done with a .htaccess rule.
At least I know to stop looking if it cant be done.

I may have confused the issue by mentioning ACL though. Really I just want joomla to be able to call the file while not allowing it to be public.

nicholas
Akeeba Staff
Manager

I may have confused the issue by mentioning ACL though. Really I just want joomla to be able to call the file while not allowing it to be public.

This is what I understood. You can't. As I said, Apache serves static files without having any idea whatsoever if the user at the other end is logged in to Joomla!. It doesn't even know what Joomla! is. If you make the file private, nobody will be able to access it.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

creotom

Ok, I accept it is not possible. Thank you.

I think I misled myself when I read various google results about mod rewrite rules preventing hotlinks.

I will look for an alternative solution.

Β 

creotom

What about a .htaccess rule that redirected all paths to a folder outside the site root?

Β 

nicholas
Akeeba Staff
Manager

As I said, Apache serves static files without having any idea whatsoever if the user at the other end is logged in to Joomla!. It doesn't even know what Joomla! is.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!