Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Message: I am able to write to the configuration file - can not change permissions


oscommerce21

Recommended Posts

Folks!

 

Please suggest, below is a message on the top of the website:

 

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

 

I am changing permissions to 444, save, upload, and it reads on the site again as 644.

 

Here is the website:

 

http://goo.gl/jPJbY

 

Thank you!

 

Merry Christmas!

post-254285-0-87033800-1323718627_thumb.png

Edited by oscommerce21
Link to comment
Share on other sites

Some webhosts do not allow 444 to be set via a web based file manager. That is also true for FTP as well.

 

However usually on those configurations I have found that PHP has owner level privaleges anyways so you can use PHP itself to change the permissions.

 

Try this below.

 

Make a file, call it whatever you want and add the following code.

 

<?php
 error_reporting(0);
   if ( ( !chmod( "includes/configure.php", 0444 ) ) ||
	 ( !chmod( "admin/includes/configure.php", 0444 ) ) ) {
	 header( "Location: ./index.php" );
  }
?>

 

Upload it into your catalog directory for your shop and then browse to it in your web browser.

 

It should set both config files to 444 for you.

 

If you have changed the name of your admin directory, then replace the 'admin' in the code above with your new admin name.

 

Once its done then you can safely delete the file you used to make the change.

Edited by Taipo

- Stop Oscommerce hacks dead in their tracks with osC_Sec (see discussion here)
- Another discussion about infected files ::here::
- A discussion on file permissions ::here::
- Site hacked? Should you upgrade or not, some thoughts ::here::
- Fix the admin login bypass exploit here
- Pareto Security: New security addon I am developing, a remake of osC_Sec in PHP 5 with a number of fixes
- BTC:1LHiMXedmtyq4wcYLedk9i9gkk8A8Hk7qX

Link to comment
Share on other sites

How did you attempt to change the permissions? Many servers are now configured to silently ignore chmod requests from FTP clients. Try using your hosting service control panel > file manager. I don't quite follow your sequence of 'changing permissions to 444, save, upload'. If already 444 on the host, you need to change it back to 644 before uploading. Once the file has been updated on the host (after uploading), you change it to 444. You don't do anything to the file on your PC -- just to the one on the host (site).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...