Post by radact » Fri Oct 25, 2019 12:20 pm

Hi,
I have weird problem that has suddenly appeared in my Opencart 2.3.0.2.

When I create a new product, I select the image file through the usual upload method, but it appears as a broken image link in the file manager, admin product search thumbnail and in the product page.

I've checked using ftp the permissions that are set for newly created .jpg and .png files and they are set to "600" instead of "644" in the folders /image/catalog/products and /image/cache/catalog/products. If I manually change it to 644, the images display properly. I need to do it to all the image sizes that are created. eg. 500x-500, 228x-228, 100x-100, and 40x-40.

Any ideas why the default permission has suddenly changed to 600 and is there any config or ini file I can modify?

New member

Posts

Joined
Fri Nov 25, 2016 11:36 am

Post by OSWorX » Fri Oct 25, 2019 2:15 pm

radact wrote:
Fri Oct 25, 2019 12:20 pm
Any ideas why the default permission has suddenly changed to 600 and is there any config or ini file I can modify?
You write "suddenly", which means it has worked before?
If yes, what has changed on the server level?
If no, why suddenly?

In both cases you have to check the server settings (not OpenCart and no OpenCart settings).
Maybe contact your provider to solve that, becuase as it seems the server is configured wrong.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by radact » Fri Oct 25, 2019 2:34 pm

Yes, has been working fine for a couple of years. This is very sudden. I added a new item last week it was fine, I went to add something today when this problem appeared. There havent been any new mods or extensions added since then.

I've contact Hostpapa, they are investigating now to see if they have changed anything at their end. I was curious to see if it was something I might have done on my end or a setting that I can change to fix it.

New member

Posts

Joined
Fri Nov 25, 2016 11:36 am

Post by radact » Fri Oct 25, 2019 8:14 pm

So far they have not been able to identify the problem.

Is there a module/routine that is called when OC 2.3.0.2 needs to upload or create a new file? ie. a new upload using the image manager or when it creates a cache file? Can we add a line in there which changes the permissions to 644? (instead of 600)

Otherwise at this stage I have to ftp in and change the permissions manually to get around the problem.

New member

Posts

Joined
Fri Nov 25, 2016 11:36 am

Post by OSWorX » Sat Oct 26, 2019 3:52 pm

radact wrote:
Fri Oct 25, 2019 8:14 pm
So far they have not been able to identify the problem.
Are they sure what they are doing?
You told us it stopped suddenly without any interaction from your side.
Which means, OpenCart has worked and is NOT responsible for the break.

Which lead us to the fact, that something on the server must have been changed.
This can be another php.version, a new installed server module, and so on.
Things out of your scope, handled only by the provider.

Leads to:
1. the provider should be able to identy what cause the wrong permission/user rights
2. try it on another or change the provider

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by radact » Sat Oct 26, 2019 5:17 pm

Good news, Hostpapa was able to identify the problem and fixed it by modifying the image.php file to modify the permissions when uploading.
The fix was addressed on this link:
https://guidescroll.com/2011/11/opencar ... error-fix/

I'll go and give it a try now.

New member

Posts

Joined
Fri Nov 25, 2016 11:36 am

Post by OSWorX » Sun Oct 27, 2019 12:06 am

radact wrote:
Sat Oct 26, 2019 5:17 pm
Good news, Hostpapa was able to identify the problem and fixed it by modifying the image.php ..
That's not a solution, that is as I have written: a bad configured server and a provider not knowing his job.
They should go to Mama and stay there.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 6 guests