Forums / General Questions / Moving from files from Apache to CGI - potential problems?

Moving from files from Apache to CGI - potential problems?

Views: 1,464

Results 1 to 6 of 6
24 Apr 2013, 8:46 PM
#1
rebelman avatar

rebelman

New Zenner

Join Date:
Nov 2010
Posts:
53
Plugin Contributions:
0

Moving from files from Apache to CGI - potential problems?

Hi

I have encountered a problem where I can't edit some of my zen cart files, when I explained this to my hosting provider they told me that the files are owned by Apache and the only way to take ownership of those files is to move to CGI. I haven't a clue of the difference between CGI and Apache, however I do believe it is recommended to run Zen cart on Apache so for this reason I want to stay on Apache. However, in order to edit my files I still need to move to CGI - my hosting provider will then transfer ownership of the files to my FTP user. They told me I could then move back to Apache. Is it possible to do this without having any adverse impact? It seems on CGI the maximum allowed permissions is 755, otherwise it will cause PHP errors. I don't mind having the site down for a few minutes to do this but I am worried by moving to CGI and then back to Apache may cause problems.

I appreciate any advice?

Thanks

24 Apr 2013, 8:55 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Moving from files from Apache to CGI - potential problems?

Let's back up ... WAY back ...

You said: "I have encountered a problem where I can't edit some of my zen cart files".

Which exact files are you referring to? How did you get them onto your server in the first place? How did you arrive to this situation where files that you put onto the server are suddenly unaccessible to you?

Sounds more likely that your hosting company made a change which broke things on you.

Zen Cart's files are installed by you, using your FTP account in the first place. There's no reason for the ownership to ever change.
An isolated exception to that is files that are created by Zen Cart or its plugins, in which case the same action would be used to alter those same files, without an ownership issue.

So ... while you've posted a question that's dealing with trying to implement a solution you've arrived at, it's rather important to understand the bigger picture behind the original problem that caused you to ever venture down this path ...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Apr 2013, 11:53 AM
#3
rebelman avatar

rebelman

New Zenner

Join Date:
Nov 2010
Posts:
53
Plugin Contributions:
0

Re: Moving from files from Apache to CGI - potential problems?

DrByte:

Let's back up ... WAY back ...

You said: "I have encountered a problem where I can't edit some of my zen cart files".

Which exact files are you referring to? How did you get them onto your server in the first place? How did you arrive to this situation where files that you put onto the server are suddenly unaccessible to you?

Sounds more likely that your hosting company made a change which broke things on you.

Zen Cart's files are installed by you, using your FTP account in the first place. There's no reason for the ownership to ever change.
An isolated exception to that is files that are created by Zen Cart or its plugins, in which case the same action would be used to alter those same files, without an ownership issue.

So ... while you've posted a question that's dealing with trying to implement a solution you've arrived at, it's rather important to understand the bigger picture behind the original problem that caused you to ever venture down this path ...

Thanks DR Byte...yes I do think something was changed as I used to be able to access these files last year! It only affects some files. However, my hosting provider have told me that there was no change and are basically assuring me that there would be no issue moving to CGI and back again to Apache....but I think not! Do you have any advice?

Thanks

25 Apr 2013, 1:29 PM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Moving from files from Apache to CGI - potential problems?

rebelman:

my hosting provider have told me that there was no change

They'll almost always say that. Sometimes even truthfully :)

rebelman:

and are basically assuring me that there would be no issue moving to CGI and back again to Apache....but I think not! Do you have any advice?

The whole idea switching between 'Apache' and 'CGI' is both ridiculous and meaningless.

Apache is a WebServer Application.

CGI, stands for 'Common Gateway Interface', it is a method used by Apache (and other) WebServers as a means to allow access to executable files/programs that would normally be denied to the server itself. In other words, this works with a webserver, not instead of.

So, the question then comes down to, Does ZenCart require CGI accesss? The answer is an outstanding 'No'. Zencart handles all the things it needs via PHP. Although PHP also works in conjunction with the Web Servers, it isn't the same as CGI, in that it is a 'pre_processor', meaning that it handles things before Apache itself (simply speaking). Furthermore, because of the way PHP works it has for the most part made the need for 'CGI' redundant.

In short, regardless of the cause of your problems, your host either doesn't know what they are talking about, or they are hoping to BS you for some reason.

To give the benefit of the doubt though, we really don't have a clue as to exactly how the conversation went. It could be a simple case of mis-communication?

By reading between the lines, I'm figuring that rather than 'CGI', the host is really trying to tell you about 'suhosin'. Again, nothing to do with CGI, but instead, a PHP 'patch' that many hosts use to help increase security (one of the ways it does this is via strict control over the file permissions).

For the most part, a typical user wouldn't know if 'suhosin' is being used or not, especially if the file permissions are generally 'secure' in the 1st place.

Having said that though, because 'suhosin' is a security hardening' measure, its very nature can tend to break things that wouldn't usually have a problem.

It is impossible to answer your concerns about whether "there would be no issue moving to CGI and back again to Apache" until/unless we know what is actually meant.

As well as these comments, I'm in 100% agreement with DrByte..... There is a much bigger picture to look at, etc, etc, etc.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

25 Apr 2013, 2:43 PM
#5
rebelman avatar

rebelman

New Zenner

Join Date:
Nov 2010
Posts:
53
Plugin Contributions:
0

Re: Moving from files from Apache to CGI - potential problems?

Thanks Rob, I will give them a call now with more knowledge!

25 Apr 2013, 6:11 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Moving from files from Apache to CGI - potential problems?

rebelman:

Thanks DR Byte...yes I do think something was changed as I used to be able to access these files last year! It only affects some files. However, my hosting provider have told me that there was no change and are basically assuring me that there would be no issue moving to CGI and back again to Apache....but I think not!

Do you have any advice?

You still didn't answer my question about which files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.