Wednesday, December 18, 2013

Permissions warning message in OsCommerce

This tutorial will show you how to resolve the issue with the file permissions and remove the warning message from the top of your osCommerce store. This error is triggered because the permissions on the file are set to Read, Write and Execute (UNIX) or on Windows no attributes are checked in the file properties. In order to fix this:


1. On Windows as your test server:Right click on ‘includes/configure.php’, select ‘Properties‘ (A new box will appear…), select/Tick ‘Read-only‘ and click ‘Ok’:


properties-read-only


2. On LINUX/UNIX: Open the /includes/ directory and using CHMOD* and set the permissions to 444for theconfigure.phpfile. (Some systems may prefer 644). There are three ways of doing this:


  • using an FTPclient like Filezilla “Client” (or Total Commander, CuteFTP etc). For doing that in FileZilla,

  • login to your site using the client;

  • right click the file or directory that you want to change permissions on: filepermissions1_thumb

  • the following screen will appear:

filepermissions2_thumb


On this screen you have two choices for changing permissions.  You can check the “Read”, “Write” and “Execute” check boxes, or better type a Numeric Value (444 or 644) into the “Numeric Box”.  And click OK.


  • via a File Manager tool provided by your webhosting provider. In cPanel, it’s called File Manager. In other tools it might be called something different. In the file manager, you can simply navigate to the file you want to alter permissions for, then click on the File Properties link/button and set permissions. The links could have varying names. If you are having a hard time finding all these options, contact your host provider for help or try method 1.

  • (this way does not require changing the permssions) in  /catalog/includes/header.phpon your server change line 22 from this


if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

 



to this



 if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (fileperms(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php') & 18) ) {

 



If any of these solutions doesn’t work, then you must contact your hosting company’s tech support and ask them to do it for you.


* CHMOD(abbreviated from change mode) is a Unix command that lets a user tell the system how much (or little) access it should permit to a file.



Permissions warning message in OsCommerce

No comments:

Post a Comment