Opencart .php on IIS 7.5 Permission Denied

image

The Problem

We ran into an interesting issue while playing with Opencart on IIS 7.5. The issue was around a common third party module being used called Magic Zoom Plus.

The error showed it’s self with the loading of some junk text at the beginning of many pages when loading.

The text looked like this:

Warning: file_put_contents(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): failed to open stream: Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 171Warning: unlink(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 172Warning: rename(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus

.css~backup,C:\inetpub\wwwroot\www.domain.com\admin\controller\module\

magictoolbox/magiczoomplus.css): Access is denied. (code: 5) in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 173Warning: file_put_contents(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): failed to open stream: Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 171Warning: unlink(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 172Warning: rename(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/

magiczoomplus.css~backup,C:\inetpub\wwwroot\www.domain.com\admin\controller\module

\magictoolbox/magiczoomplus.css): Access is denied. (code: 5) in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 173Warning: file_put_contents(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): failed to open stream: Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 171Warning: unlink(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 172Warning: rename(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus

.css~backup,C:\inetpub\wwwroot\www.domain.com\admin\controller\module\

magictoolbox/magiczoomplus.css): Access is denied. (code: 5) in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 173Warning: file_put_contents(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): failed to open stream: Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 171Warning: unlink(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 172Warning: rename(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus

.css~backup,C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox

/magiczoomplus.css): Access is denied. (code: 5) in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 173Warning: file_put_contents(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): failed to open stream: Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 171Warning: unlink(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus.css): Permission denied in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 172Warning: rename(C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/magiczoomplus

.css~backup,C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox/

magiczoomplus.css): Access is denied. (code: 5) in C:\inetpub\wwwroot\www.domain.com\admin\controller\module\magictoolbox\module.php on line 173

 

We knew immediately that it is a windows server permission error. However the strange thing is that we were pretty sure that the permissions were correct. We looked around at the settings and found them to be correct too.

The Solution

We ended up going to the website root, and selecting permission (on the server with RDP) and resetting the entire folder and all sub folders permissions. This fixed the problems. Can’t explain why but this is the second time we have needed to do this while running PHP on IIS. May be time to change back to a real php server.

The Permanent Fix

We have done details here that explain how to stop the being necessary.

Opencart on IIS 7.5 Windows 2008 Server FTP Permissions Changing

Leave a Reply

Your email address will not be published. Required fields are marked *