oscommerce21 Posted December 12, 2011 Share Posted December 12, 2011 (edited) 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! Edited December 12, 2011 by oscommerce21 Quote Link to comment Share on other sites More sharing options...
Taipo Posted December 12, 2011 Share Posted December 12, 2011 (edited) 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 December 12, 2011 by Taipo oscommerce21 1 Quote - 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 More sharing options...
MrPhil Posted December 12, 2011 Share Posted December 12, 2011 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). oscommerce21 1 Quote Link to comment Share on other sites More sharing options...
oscommerce21 Posted December 12, 2011 Author Share Posted December 12, 2011 Thank you all! Update: Was able to change it from Control Panel! T Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.