Zen Cart Logo
Forums / General Questions / configure.php's CHMOD 444 is not recognized.

configure.php's CHMOD 444 is not recognized.

Locked

Views: 6,765

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
20 Jun 2006, 10:33 PM
#1
yukiko avatar

yukiko

New Zenner

Join Date:
Jun 2006
Location:
Lowell, MA
Posts:
3
Plugin Contributions:
0

configure.php's CHMOD 444 is not recognized.

My cart gets this warning message:
Warning: I am able to write to the configuration file: server/..../includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

But the configure.php is already set to read only mode (444). I made sure that over the FTP program. The hosting service provider also confirmed that the permissions are set to CHMOD 444. According to them, there is nothing to do with their server.

For some reasons, the permissions is not recognized????

The configure.php is the only one in the includes directory. All configure.php in other directories to change their permission after the instration are set to 444. I don't know where else needs to be checked.

Could you tell me how to fix this problem? This is ver. 1.3.0.

Thank you,

20 Jun 2006, 11:27 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: configure.php's CHMOD 444 is not recognized.

There have been servers where even the 444 does not remove the error as if the server is not reporting the settings properly ...

If you are absolutely sure that your settings are 444 ...

You can remove the warnings manually for your site ... but we do caution you before doing this to really make sure that everything has been tried before hand before doing this ...

You can edit the code in:
/includes/init_includes/init_header.php

To comment out the message for the warning:

// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
  if ( (file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
    $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
  }
}

to read:

// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
  if ( (file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
//    $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
  }
}
20 Jun 2006, 11:42 PM
#3
vger avatar

vger

Past Contributor

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

Re: configure.php's CHMOD 444 is not recognized.

Some servers require settings of 400 (Owner - Read Only). Give that a try.

Vger

16 May 2007, 2:49 AM
#4
bread_o avatar

bread_o

New Zenner

Join Date:
Mar 2007
Posts:
64
Plugin Contributions:
0

Re: configure.php's CHMOD 444 is not recognized.

Ajeh:

There have been servers where even the 444 does not remove the error as if the server is not reporting the settings properly ...

If you are absolutely sure that your settings are 444 ...

You can remove the warnings manually for your site ... but we do caution you before doing this to really make sure that everything has been tried before hand before doing this ...

You can edit the code in:
/includes/init_includes/init_header.php

To comment out the message for the warning:

// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
}

>  
> to read:
> ```php
// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
  if ( (file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
//    $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
  }
}

Does not work for me. I'm using v1.3.7

how can i make the installer skip this check?

16 May 2007, 11:38 AM
#5
vger avatar

vger

Past Contributor

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

Re: configure.php's CHMOD 444 is not recognized.

Comment out all of that code, not just part of it, and comment out this code above it:

define('WARN_CONFIG_WRITEABLE', 'true');

Vger

14 Mar 2008, 12:39 PM
#6
jmouse avatar

jmouse

New Zenner

Join Date:
Mar 2007
Posts:
53
Plugin Contributions:
0

Re: configure.php's CHMOD 444 is not recognized.

I LOVE the zen-cart forum!!

  • you have a problem, you search and you find an answer!

Thanks All

14 Mar 2008, 12:58 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: configure.php's CHMOD 444 is not recognized.

If you set 444 via FTP, then you may find that your host does not allow 444 to be set via FTP - and even though you think you've changed to 444, it reverts to 644. You may have to set 444 via your host c-panel in a browser.

18 Mar 2008, 3:11 PM
#8
austrainer avatar

austrainer

New Zenner

Join Date:
Jul 2007
Posts:
8
Plugin Contributions:
0

Re: configure.php's CHMOD 444 is not recognized.

Vger:

Some servers require settings of 400 (Owner - Read Only). Give that a try.

Vger

I'm with hostgator & had to change my configure.php to 400 as it would revert from 444 to 644 & I checked it in cpanel file manager & ftp - both looked correct until a refresh.
Once I changed to 400 - all good

Thanks to all on the forum.