I am hosting OpenCart websites, mostly 2.x ones.
As I am getting familiar with version 3.x, I just want to know more about this storage folder moving outside the web directory, what pops up as an important security notfication at first OC setups.
As a sysadmin, I just simply don't get this security solution. I've never met something like this before using other engines.
Why is this important? And what are the exact permission requirements for the moved folder?
Can anyone explain these for me from a sysadmin point of view? I couldn't find any specific details in documentation.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
e.g.:
/var/www/site1/system/storage -> /var/www/site1_storage
/var/www/site2/system/storage -> /var/www/site2_storage
/var/www/site3/system/storage -> /var/www/site3_storage
straightlight wrote: ↑Thu Dec 28, 2017 1:12 amRequires domain permissions for Opencart to write its cache data when either using vendors, cache and extensions. Move your system/storage outside your public_html folder. Then, set recursive settings to the storage folder with CHMOD 0755. In your config.php and admin/config.php files, edit your DIR_STORAGE definition folder to its new destination as well as from your .htaccess file (if found in your .htaccess file as well).
Each domain should use their own storage folder so to avoid cache conflict. Although, each config.php and admin/config.php files of each stores must also be configured accordingly as well as each .htaccess files from the OC root store path by remove the entire line where the system/storage is located.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am running Chromium 64.0 browser on a Debian 9.3 linux system, and my opencart is hosted on Dreamhost. Adblock is turned off for my Opencart site.
I guess I can try moving the storage directory manually via an ssh login, and editing the appropriate config.php files. But I thought I'd mention this problem in case anyone else has also had this problem, and in case a Issue needed to be opened on Github.
Also, I downloaded the Opencart from Github, so I probably installed the latest code from the master branch. Maybe this is the issue?
https://www.opencart.com/index.php?route=cms/download
The latest version 3.0.2.0 does have bugs, which you can look for fixes in the bugfix forum topic or on github, and then fix yourself. Hopefully one of these days we'll actually get an official 3.0.3.0 release that has the bugfixes in it...
Despite the un-relative years of experience since Opencart hasn't been created at that time, while the above is correct regarding the stable releases to be used rather than the dev versions, followed are instructions on how to resolve these issues with the security modal window when the automatic settings has not been selected but rather the manual option on PCI servers: viewtopic.php?f=202&t=201745#p713479FWIW, I'm not a noob on computers, as I have been a engineer/developer for over 25 years.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
everything is fine with installation except this fucking move thing.
i already installed many scripts but this one is really annoying. why i have to move something?
it wastes my time and its annoying because it doesnt work. not automatically and also not manually.
where i have to change what? please give me exact advises, thanks!
when i wanna move it automatically i get this looong message:
the hoster is hoststar.
so what can i do??
please clear and straight answers, thanks.
https://www.opencart.com/index.php?rout ... n_id=35477
https://www.opencart.com/index.php?rout ... n_id=31130
https://www.opencart.com/index.php?rout ... n_id=35633
https://www.opencart.com/index.php?rout ... n_id=34306
https://www.opencart.com/index.php?rout ... n_id=33410
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Code: Select all
## no access to this folder
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
# Apache 2.2
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
Code: Select all
RewriteRule ^(/storage/) - [F,L,NC]
Take note that the above changes are server-specifics and may not respond on other servers. In addition, those changes does not specifically reflect on the storage folder as opposed to the original instructions in the FAQ.Lytrax wrote: ↑Thu Feb 13, 2020 9:07 amWe could avoid all that move thing outside of the webroot if we add a simple Apache htaccess to `/storage/` directory:
Or to the webroot htaccess:Code: Select all
## no access to this folder # Apache 2.4 <IfModule mod_authz_core.c> Require all denied </IfModule> # Apache 2.2 <IfModule !mod_authz_core.c> Order Allow,Deny Deny from all </IfModule>
There are also simple config options for Nginx servers.Code: Select all
RewriteRule ^(/storage/) - [F,L,NC]
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am installing Open Cart v3.0.3.3 in order to migrate a site from an older version.
Everything was fine until I moved the storage folder outside the public_html folder.
After the move, I edited the config files of the main folder and the admin folder in this way, following the documentation:
Main folder Config.php
Code: Select all
define('DIR_APPLICATION', '/home/c1300630/public_html/2020/catalog/');
define('DIR_SYSTEM', '/home/c1300630/public_html/2020/system/');
define('DIR_IMAGE', '/home/c1300630/public_html/2020/image/');
define('DIR_STORAGE' . '/storage/');
Code: Select all
define('DIR_SYSTEM', '/home/c1300630/public_html/system/');
define('DIR_IMAGE', '/home/c1300630/public_html/image/');
define('DIR_LANGUAGE', '/home/c1300630/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/c1300630/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/c1300630/public_html/system/config/');
define('DIR_STORAGE', '/storage/');
I am having these warnings in the front end:
Code: Select all
Warning: fopen(DIR_STORAGElogs/openbay.log): failed to open stream: No such file or directory in /home/c1300630/public_html/2020/system/library/log.php on line 22Warning: Cannot modify header information - headers already sent by (output started at /home/c1300630/public_html/2020/system/framework.php:42) in /home/c1300630/public_html/2020/catalog/controller/startup/session.php on line 25Warning: Cannot modify header information - headers already sent by (output started at /home/c1300630/public_html/2020/system/framework.php:42) in /home/c1300630/public_html/2020/catalog/controller/startup/startup.php on line 99Warning: Cannot modify header information - headers already sent by (output started at /home/c1300630/public_html/2020/system/framework.php:42) in /home/c1300630/public_html/2020/catalog/controller/startup/startup.php on line 157Warning: fopen(DIR_STORAGElogs/openbay.log): failed to open stream: No such file or directory in /home/c1300630/public_html/2020/system/library/log.php on line 22Warning: fclose() expects parameter 1 to be resource, boolean given in /home/c1300630/public_html/2020/system/library/log.php on line 39Warning: fopen(DIR_STORAGElogs/error.log): failed to open stream: No such file or directory in /home/c1300630/public_html/2020/system/library/log.php on line 22
Code: Select all
Warning: fopen(/storage/logs/openbay.log): failed to open stream: No such file or directory in /home/c1300630/public_html/2020/system/library/log.php on line 22Warning: fopen(/storage/logs/error.log): failed to open stream: No such file or directory in /home/c1300630/public_html/2020/system/library/log.php on line 22Warning: Cannot modify header information - headers already sent by (output started at /home/c1300630/public_html/2020/system/framework.php:42) in /home/c1300630/public_html/2020/system/library/response.php on line 36Warning: fclose() expects parameter 1 to be resource, boolean given in /home/c1300630/public_html/2020/system/library/log.php on line 39Warning: fclose() expects parameter 1 to be resource, boolean given in /home/c1300630/public_html/2020/system/library/log.php on line 39Warning: fclose() expects parameter 1 to be resource, boolean given in /home/c1300630/public_html/2020/system/library/log.php on line 39
Reason: Please use the code tags!
Code: Select all
define('DIR_STORAGE', '/storage/');
Code: Select all
define('DIR_STORAGE', '/home/c1300630/storage/');
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
As per the FAQ, this modal security window is also server-specifics as, from other servers, using this feature may cause further problems, by using the automated setting, and rather requires the storage folder to be moved manually. However, if the automated setting worked for you, you're just one of the lucky ones. Thanks for posting the feedback.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
C:/xampp/htdocs/my-website/
And then when I moved the storage folder from my-website the storage folder's directory became this:
C:/xampp/storage/
Now I want to upload my-website into my server. With most PHP hosts they upload their websites into a folder called public_html. So for example my website's directory became this after uploading (my-server-name isn't really its name):
/home/my-server-name/public_html/my-website/
However when I uploaded my-website with FTP the storage folder wasn't uploaded along with the rest of the website. So should I upload it manually with cPanel? And if so would it be into this directory:
/home/my-server-name/storage/
Unless using a dedicated and fully managed server, the modal window should not be responded but rather ignored and to move the storage folder manually from your cPanel's file manager to speed up the process as per the FAQ. Then, to download the store to your local virtual server such as XAMPP. The storage folder can simply be re-recreated locally and ensure both config.php files do match the new storage path and their sub-folders accordingly as well as your database paths and URLs in your tables. As to re-upload your store to the server, that would be correct as long as both config.php files and database paths and URLs in your tables are also renamed back accordingly. Also take note that your storage folder must be set to CHMOD 0755 recursively on your folders - not on files - from FTP. No errors must present themselves during the CHMOD operation.rgfuelcells wrote: ↑Wed Aug 11, 2021 5:17 amFollowup question for those who have installed OpenCart 3 locally first and then uploaded that same website to the server. I installed OpenCart locally and I responded to the "Move the Storage" prompt by manually moving the folder. Typically people using XAMPP install their websites into the htdocs folder so for example my website is installed in this directory (my-website isn't really its name):
C:/xampp/htdocs/my-website/
And then when I moved the storage folder from my-website the storage folder's directory became this:
C:/xampp/storage/
Now I want to upload my-website into my server. With most PHP hosts they upload their websites into a folder called public_html. So for example my website's directory became this after uploading (my-server-name isn't really its name):
/home/my-server-name/public_html/my-website/
However when I uploaded my-website with FTP the storage folder wasn't uploaded along with the rest of the website. So should I upload it manually with cPanel? And if so would it be into this directory:
/home/my-server-name/storage/
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
chmod -R 777 /home/
don't create a folder or anything
Next just simply use the open cart GUI to move the folder for you now that it has the permissions
Almost im not saying 777 is best security practice maybe a 755 or come up with your own command that will work i just did this for experimental purpose when i was setting this up it worked flawless
Users browsing this forum: No registered users and 32 guests