News:

Looking for documentation? Take a look on our wiki

Main Menu

Safe Path outside Document Root

Started by Napoleon, August 14, 2016, 14:39:42 PM

Previous topic - Next topic

Napoleon

[Ubuntu 14.04, Apache2.4, php5 fastcgi, Joomla 3.4, Virtumart 3]

Hi,

  I am new to Virtumart and am having a little trouble with SAFE PATH.  The best option suggested, and with which I agree, is to have it located outside document root and not accessible through a URL, but I'm having trouble setting this up.  I have already read the post here and on gavick but they don't answer what I'm trying to do.

  My Joomla installation is in the Document Root folder of my site (not a sub-folder) and I have access to the folders above my document root; e.g. /home/me, /bin, /etc, ...  A more formal way of expressing this is that my server is chrooted using jailkit.  The absolute path to my doc root is /var/www/me/web.
  So I created a folder to use as my Safe path in '/var/www/me/vmfiles' and set its permissions to 777 (for now) with the owner/group being my account (of course).  I then put that path into the Safe Path field in VM with a trailing '/'.  Having done this, I was surprised that VM was still complaining that it can't access that folder.

I can create an alias to that folder in my virtual host config file, but then it becomes accessible from a URL.  So I'm wondering how to set this up so that it can't be accessed through a URL.  Does VM use CGI?

Cheers,
Nap

GJC Web Design

so your Joomla and VM install are in /var/www/me/web?

then i see no reason why VM couldn't access /var/www/me/vmfiles/

try 755.. some servers hate 777 

but other than that this is where i would put my safe path in this example..

what is e.g. the temp path showing in the joomla config? And I assume it works
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Napoleon

Joomla's Temp folder is /var/www/me/web/tmp, which is inside Doc Root, and my Joomla install is not complaining about it.
I tried 755 and 775 on /var/www/me/vmfiles, but it's still not working.  :(


GJC Web Design

with that temp should it not be  /var/www/me/web/vmfiles/   ?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Napoleon

No, because I can access that folder through the URL  mydomain/tmp/<file>, and I would be able to access vmfiles through mydomain/vmfiles/.



GJC Web Design

so /web contains the site files?

if so /var/www/me/vmfiles/ is correct and you need to sort your strange access problems.. on a typical setup this works..
otherwise follow the instructions for a folder  in the site with obscure path name
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation