Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

the dreaded permissions not set for configure.php


artfrog

Recommended Posts

Hi there,

 

Does anyone know a solution to get rid of the warning on the homepage after you install Oscommerce i.e. (I can write to /includes/configure.php... please change permissions"

 

I have read tons of posts here about people having this same problem, and I can find no solution... I have set every permission on this file with no result.

Link to comment
Share on other sites

What type of web server are you on? If it's Windows you can't use the CHMOD command, which only works on Linux and Unix servers. So, if you are on a Windows server you'll have to get your hosting company to alter the file permissions for you - unless you have Telnet or SSH access and know how to alter the permissions in that way.

 

If you are on a Linux or Unix server and you have been unable to alter the file permissions for catalog/includes/configure.php then it may be that an error has crept into the file on the server and the file has become 'locked', in which case you'll have to get your host company to unlock it. You can check to see if it is locked by making a backup and then try to delete the original. If you can't delete it then it's locked.

 

By the way, when you say you have tried 'every permission' have you tried 400 (read only), because that's what it should be.

 

Vger

Link to comment
Share on other sites

If all the good things Rhea has pointed out still has you getting the warning, then you can edit

 

catalog/includes/header.php and comment out line 23

 

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

 

as

 

//$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

 

HTH

Tom

Link to comment
Share on other sites

Hi there!

 

thanks for your help! I am on a Linux server... I tried the recommended permissions that I found in the osCommerce documentation... 644, and then 444 with no result... I then tried Vger's recommendation, 400, which also did not work.

 

I will try editing out the header.php file like the other suggestion has, but this worries me, as it still leaves me open to attack? or is it just a glitch in the OsCommerce code? If the permission is 400, then it doesn't really matter what OsCommerce says?

 

Thanks again guys!

 

S.

Link to comment
Share on other sites

Hi there again,

 

Of course commenting out the thrown exception works perfectly... I would like to know more about the file being locked. It just seems that it's stil throwing the exception, I am just ignoring it. Should I delve deeper?

 

S.

Link to comment
Share on other sites

Rhea's suggestion for 400 permission should have worked.

 

Are you sure the permission is really changing?

 

Some hosts won't let you set certain permissions. You might want to pursue this deeper, as you suggested. Also some ftp programs let you run the chmod command but it never really runs because of host restrictions.

 

Tom

Link to comment
Share on other sites

I had the ISP/Host set the permission to 400 and it worked. Thanks for everyone's input. If anyone else encounters this, please don't rule out ISP restrictions on CHMOD'ing via ftp. Perhaps this will save someone else a major headache.

Link to comment
Share on other sites

Glad you got it sorted!

 

Rhea

 

Hello,

 

I had a similar problem, and Even SSH'ing to the server and setting the permission to 400 didn't work.

 

I did do a minor hack to the code that checks the file:

is_writable() is not a foolproof method of checking if a file is writeable. However, opening the file in Write mode is. you don't even need to append anything to the file, If anyone is interested in my hack, let me know.

 

ken.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...