Forums / Installing on a Linux/Unix Server / Configure.php file permissions.

Configure.php file permissions.

Locked

Views: 9,950

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
23 Jan 2007, 6:37 PM
#1
ndnguru avatar

ndnguru

New Zenner

Join Date:
Jan 2007
Posts:
6
Plugin Contributions:
0

Configure.php file permissions.

I am trying to install Zen-Cart on a Linux system. I have properly set the permissions of the two configure.php files (includes/configure.php and admin/incudes/configure.php). I also set the correct permissions for all the other directories as recommended by the installation wizard. The installer still complains that the two configure.php files are unwriteable.

I checked numerous times and reset the permissions numerous times.

Anyone know why this is happening? I cannot move to the next phase of installation without correcting these errors.

What should I do?

23 Jan 2007, 6:48 PM
#2
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Configure.php file permissions.

try clearing your cache,
hit ctrl + F5
give it another try

also verify that the permission changes to the configure.php files actually took place

make sure to refresh the ftp window and check the file properties to make sure that the change took place

Zen cart PCI compliant Hosting

24 Jan 2007, 4:39 AM
#3
ndnguru avatar

ndnguru

New Zenner

Join Date:
Jan 2007
Posts:
6
Plugin Contributions:
0

Re: Configure.php file permissions.

CTRL+F5 did not work (that is a client-side cache clear).

I even did this:
chmod -R 777 [to the top level zen-cart directory]!

Now all the files are set to 777 permissions. Still not working!

Is there anything in the Apache httpd.conf file with respect to <Directory> directives that might need tweaking?

I even tried removing/renaming the .htaccess file in the includes dir.

When I change a file permission to read/write only, i am certainly prohibitted from loading that page...

I also changed the owner of all the files to "apache" ...didnt work

I am having the same problem with osCommerce (I tried installing that one too)

I'm out of ideas....

10 Feb 2007, 1:40 PM
#4
edwinlloyd avatar

edwinlloyd

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Re: Configure.php file permissions.

I have exactly the same problem. I too cannot find a solution given that the rights of these two files are set exactly as suggested. Any further thoughts from more experienced users would really be welcome.

my greener home. Save money and save the environment.

10 Feb 2007, 6:43 PM
#5
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Configure.php file permissions.

This isn't a Zen Cart problem. Folders should be 755, and files 644 except for the two configure.php files - set to 755 or 777 during the installation. After the install is complete reset to 444 or 400 on an Apache based server.

If you can't install with those permissions then you don't have the server set up correctly.

Vger

11 Feb 2007, 4:47 PM
#6
ndnguru avatar

ndnguru

New Zenner

Join Date:
Jan 2007
Posts:
6
Plugin Contributions:
0

Re: Configure.php file permissions.

Are you running RH Linux? If so, the problem could be that you have Securtiy Enhanced Linux running on it... Once I configured SELinux to run in passive mode, my problem was solved!

check your /etc/selinux/config file to see what mode your SELinux is running in.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - SELinux is fully disabled.

If you change it to permissive mode, your problem should be fixed.

You may also want to read up on how to configure your selinux so that you enforece the correct security policies.

I hope this helps...

11 Feb 2007, 7:48 PM
#7
edwinlloyd avatar

edwinlloyd

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Re: Configure.php file permissions.

Well I'm using a pretty fresh install of Ubuntu 6.10 (Edgy), with Apache 2.0.55 and PHP 5.1.6. I don't think I have SELinux anywhere active on the system.
Both the includes directory and the configure.php file have 777 rights.
I have spent hours trawling the forum and see that this difficulty has arisen several times before. It may indeed not be a Zen software problem, but rather just a common user error, but none of the replies in the forum seems to show a repeatable solution - one of the frustrations I so often find with Linux.

my greener home. Save money and save the environment.

11 Feb 2007, 10:55 PM
#8
edwinlloyd avatar

edwinlloyd

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Re: Configure.php file permissions.

Well I finally got past that problem, by restarting and following these instructions very carefully (up until the "apache2-ssl-certificate" command):

http://www.zen-cart.com/forum/showthread.php?t=43937

thank you for your help though.

my greener home. Save money and save the environment.

15 Feb 2007, 11:16 AM
#9
mastermute avatar

mastermute

New Zenner

Join Date:
Feb 2007
Posts:
5
Plugin Contributions:
0

Re: Configure.php file permissions.

I don't know if it has been covered before, but an alternative to using cPanel or FTP to try to change file permissions is using PHP to do it... Maybe it could be part of the install script; "Set permissions on configuration files?"

<?php 
/*
Changing file rights with php, an alternative to changing rights with cPanel/ftp/shell.

Pop this in a file named rights.php in you root directory for Zen-Cart, then execute it:

http://{www.mydomain.com/somepath}/rights.php

Be sure to delete the file when you're done!

*/
chmod("admin/includes/configure.php", 0444);
chmod("includes/configure.php", 0444); 
echo "Rights changed!<br><b>Delete this file! (" . $_SERVER["SCRIPT_NAME"] . ")</b>"; 
?>
3 May 2007, 10:00 PM
#10
paintball avatar

paintball

New Zenner

Join Date:
Dec 2006
Location:
Tacoma, WA, USA
Posts:
8
Plugin Contributions:
0

Re: Configure.php file permissions.

ndnguru:

Are you running RH Linux? If so, the problem could be that you have Securtiy Enhanced Linux running on it... Once I configured SELinux to run in passive mode, my problem was solved!

check your /etc/selinux/config file to see what mode your SELinux is running in.
I had the same problem with files being 777 and still not writeable.

So you don't have to turn off the SE security, here is the one command that made life better (I'm running RedHat Linux and apparently SELinux).

chcon -R -h -t httpd_sys_content_t /path/to/zencart/code/

This will recusrively add the directories/files you need to the SE writeable list.

No refresh or restart needed, it just worked.

~ B

4 May 2007, 9:07 PM
#11
techker avatar

techker

New Zenner

Join Date:
May 2007
Posts:
10
Plugin Contributions:
0

Re: Configure.php file permissions.

hy guys im using a shared hosting so i canèt tweak the server.

i have tryed it all and it does not workÉas soon as i put the chmod to 444 i refresh my ftp and it goes back to 644 automaticly?

is there a way to fix this??

Warning: I am able to write to the configuration file: /home/hugues/public_html/magasin/includes/configure.php. This is a potential security risk - please set the right user permissions on this file (read-only, CHMOD 644 or 444 are typical). You may need to use your webhost control panel/file-manager to change the permissions effectively. Contact your webhost for assistance.

4 May 2007, 10:15 PM
#12
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Configure.php file permissions.

Use the File Manager in your web hosting control panel to change the permissions.

Using FTP does not work on Windows servers - because chmod is for Apache servers only.

Some Apache hosting setups will allow you to increase permissions using FTP e.g. 400 to 644, but then to reduce them again you have to use the File Manager.

Vger

4 May 2007, 10:16 PM
#13
techker avatar

techker

New Zenner

Join Date:
May 2007
Posts:
10
Plugin Contributions:
0

Re: Configure.php file permissions.

opps did i mention windows?

it is linux.sorry

4 Jun 2007, 3:39 PM
#14
handyman avatar

handyman

New Zenner

Join Date:
Jun 2007
Posts:
5
Plugin Contributions:
0

Re: Configure.php file permissions.

Nice code, worked for me Thanks mastermute

7 Jun 2007, 2:01 AM
#15
high_octane avatar

high_octane

New Zenner

Join Date:
Jan 2006
Posts:
37
Plugin Contributions:
0

Re: Configure.php file permissions.

mastermute:

I don't know if it has been covered before, but an alternative to using cPanel or FTP to try to change file permissions is using PHP to do it... Maybe it could be part of the install script; "Set permissions on configuration files?"

<?php /* Changing file rights with php, an alternative to changing rights with cPanel/ftp/shell. Pop this in a file named rights.php in you root directory for Zen-Cart, then execute it: http://{www.mydomain.com/somepath}/rights.php Be sure to delete the file when you're done! */ chmod("admin/includes/configure.php", 0444); chmod("includes/configure.php", 0444); echo "Rights changed!<br><b>Delete this file! (" . $_SERVER["SCRIPT_NAME"] . ")</b>"; ?>

THANK YOU!
Solved my problem!!!
11 Jun 2007, 7:20 PM
#16
bwoodsdesign avatar

bwoodsdesign

New Zenner

Join Date:
Jun 2007
Location:
St. Paul, Minnesota, USA
Posts:
18
Plugin Contributions:
0

Re: Configure.php file permissions.

Hey techkner

You might want to contact your host and ask them to change those permissions for you, since you say you don't have access to the server.

If you have CPanel access though, you should be able to change the permissions from the File Manager tool.

Hope that helps!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
**B. Woods Design - Professional Managed Website Solutions**

26 Jun 2007, 12:01 AM
#17
tivrod avatar

tivrod

New Zenner

Join Date:
Jun 2007
Posts:
5
Plugin Contributions:
0

Re: Configure.php file permissions.

I had posted to another thread entitled Red Flag at the Top before I discovered this thread, but the forum will not let me delete the post so I can put it here, so I apologize for the dual posts, but thought my problem might get more attention in this thread. Perhaps the admin will delete it for me.

This is the nature of the error:

I am able to write to the configuration file: /home/mysite/public_html/catalog/includes/configure.php

I have the same problem on a shared Linux server. Umask is set such that it forces any changes I make to the owner to 6xx. I have attempted to set the perms on this file to 644, 444, 400, and 600 but the best I can achieve is 6xx and I still get the red warning message cited above when I access my site. I did clear my cache just to make certain that I was picking up the changes.

I also have a Fedora Core 6 server in my lab and I was able to install the zencart perfectly on the other system using Filezilla to upload to both servers and to manage setting the permissions.

I found another thread about Filezilla failing to actually change the perms but I have never seen this problem for anything else I have installed on either server.

Thus I think the problem is with my ISP (Lunarpages), but it would be nice to be able to tell them where the problem is.

Thanks for any suggestions.

26 Jun 2007, 12:10 AM
#18
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Configure.php file permissions.

If Lunar Pages provide you with cPanel then use the File Manager in cPanel to change permissions.

Vger

26 Jun 2007, 12:18 AM
#19
tivrod avatar

tivrod

New Zenner

Join Date:
Jun 2007
Posts:
5
Plugin Contributions:
0

Re: Configure.php file permissions.

I resolved the problem and I want to share my process with everyone else in hopes that this will work for them.

I had stated that CPanelX was showing 644 permissions and that was correct.

However, I did not actually change the perms in CPanelX since it agreed with the results I was seeing in Filezilla.

Since Filezilla apparently would always force 6xx, I assumed that I did not need to change the perms in CPanelX.

Once I went into CPanelX, I found that I could change the permissions to 444, which resolved my problem.

Good luck to everyone else having this problem.

26 Jun 2007, 12:21 AM
#20
tivrod avatar

tivrod

New Zenner

Join Date:
Jun 2007
Posts:
5
Plugin Contributions:
0

Re: Configure.php file permissions.

Vger:

If Lunar Pages provide you with cPanel then use the File Manager in cPanel to change permissions.

Vger

Thanks Vger!

I saw your post immediately after I had done exactly that and that did indeed resolve the problem.

Now I have to figure out why Filezilla is not changing the perms on my shared server as I have never had that problem on any of the Linux systems I have.