Page 1 of 1

[SOLVED] Opencart 3.0.3.8 and system directory writing to

Posted: Mon Mar 03, 2025 10:37 am
by Cue4cheap
Hello,
I have an extension I wrote for opencart 2.x.x.x. I just converted it to use in my test installation of Opencart 3.0.3.8 (and by proxy 3.0.4.0).
Part of my extension puts a file in the system directory. When I attempted to run the extension installer I get "The directory system/whoweaccept.csv is not allowed to be written to!" Is this part of Opencart's protection or is it my webhost? I tried a test and had the folder set to 775 and still no go.
Thanks,
Mike
P.S. I adjusted and tried the DIR_APPLICATION and the HTTPS_SERVER paths with the same error using the extension installer. I am able to directly ftp that csv file into any of those folders, it just gives that alert with the extension installer.

PPS found this interesting, but older, posting that said yes the tree is restricted....
Only these are allowed...
'admin/controller/extension/',
'admin/language/',
'admin/model/extension/',
'admin/view/image/',
'admin/view/javascript/',
'admin/view/stylesheet/',
'admin/view/template/extension/',
'catalog/controller/extension/',
'catalog/language/',
'catalog/model/extension/',
'catalog/view/javascript/',
'catalog/view/theme/',
'system/config/',
'system/library/',
'image/catalog/'

Re: Opencart 3.0.3.8 and system directory writing to

Posted: Mon Mar 03, 2025 11:46 am
by Cue4cheap
BTW this is my file structure of the ocmod.zip file
upload/
├── admin/
│ ├── controller/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.php
│ ├── language/
│ │ └── en-gb/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.php
│ ├── view/
│ │ └── template/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.twig
├── catalog/
│ ├── whoweaccept.csv/
│ ├── controller/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.php
│ ├── language/
│ │ └── en-gb/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.php
│ ├── model/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.php
│ ├── view/
│ │ └── theme/
│ │ └── default/
│ │ └── template/
│ │ └── extension/
│ │ └── payment/
│ │ └── dealwith.twig
install_v3.xml

Mike

Re: (SOLVED) Opencart 3.0.3.8 and system directory writing to

Posted: Mon Mar 03, 2025 6:45 pm
by ADD Creative
It's an OpenCart restriction, you can't install files to 'system', but can to 'system/config/' or 'system/library/'.

Re: (SOLVED) Opencart 3.0.3.8 and system directory writing to

Posted: Tue Mar 04, 2025 4:22 am
by by mona