Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New installation fails


bking2nd

Recommended Posts

I installed OScommerce version 2.3.4BS and I get this error:

The webserver is not able to save the installation parameters to its configuration files.

The following files need to have their file permissions set to world-writeable (chmod 777):

/var/www/html/kingslabpro/includes/configure.php
/var/www/html/kingslabpro/admin/includes/configure.php

 

I have verified that these files have 777 permissions yet I keep getting this error. I am running this on CentOS 7 as a fresh build with the latest Apache2 and MariaDB + PHP installed. The server capabilities side of the page is all green, just having issues with it being able to save these files, despite the fact that they have global write permissions. Any assistance would be appreciated.

Screenshot from 2017-08-09 09-04-08.jpg

Link to comment
Share on other sites

Don't automatically chmod to 777 just because someone said so. 777 ("world writable") permissions aren't even permitted by most modern servers, as they're a security exposure (anyone sharing your server can overwrite your files, and sometimes people coming in from a browser). What it is really looking for is permissions set so that PHP is able to read and write those files (during configuration). Depending on your server setup, these permissions would be different if PHP is running as the owner (e.g., suPHP), in your group, or as "other". Grant the least permissions you can, to get the job done, and if you have to grant liberal permissions to get the job done, go back to stricter permissions when done setting up.

Advice to chmod to 777 is a sure sign that those instructions haven't been updated in at least 15 years. Always take with a grain of salt.

Link to comment
Share on other sites

MrPhil, thank you for that information. I am fully aware of the security issues around setting permissions to 777. Other than that, you didn't address the question with any usable information. This server is in a test environment where it is safe to set permissions to what ever I need them to be. I am just trying to figure out this software before setting up an actual site.

 

Security issues aside, does anyone know what I can do to move the install along? I have rebuilt the server from scratch and have installed nothing but gnome, and the pre-required software. I still get this error despite the permissions being set to the requested values.

Link to comment
Share on other sites

Unfortunately the correct setting depends on your server setup. I would try setting those files to 755 or 757. If neither of those work, try other combinations until you find something that does.

Also, verify that the permissions were actually changed. Some systems have security settings that fail to set values unless you have the proper (administrator) rights to that file.

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Uh, I certainly did give usable information. If you're actually trying to set permissions to 777, it means you don't understand anything about permissions. No modern server permits world-writable files and directories (and it's bad practice on those that do), and rather than giving a 500 error, it can easily masquerade as a failure to read or write those files.

Plus, as Jim said, there are a number of ways to change permissions, but a server may reject some. For instance, in this day and age, many people still try to use FTP clients to change permissions, even though many servers silently ignore such requests. It's up to you to learn your system and how to do things, and when to ignore obsolete instructions such as "chmod everything to 777".

Link to comment
Share on other sites

  • 1 month later...

Did you get this working?  Im having the same problem on a RHEL7 server.

The install actually does suggesting setting permissions to 777 for installation purposes and change them back once install is complete.

My /var/www/html/oscommerce/includes/configure.php & /var/www/html/oscommerceadmin/includes/configure.php files are 777'd (or 755'd doesnt make a difference) but still receive the same error as OP.

This is my first osCom install - any advise would be appareicated

Cheers, Flashi

Link to comment
Share on other sites

The instructions to blindly chmod 777 are obsolete. It would be nice if the maintainers would trouble themselves to update the instructions and code. For operational use, directories at 755 and files at 644 will almost always work (except on some oddly set up systems). You need to be aware of what kind of user your PHP is running as, so that allowing PHP code to modify a file (such as the configure.php files) or write to a directory may require (temporarily or permanently) more permissive settings (e.g., 775/664 or even 777/666). You want to give everything the most restrictive permissions (lowest numbers) that you can, while still functioning correctly. Some files and directories that are hit only during installation (e.g., configure.php files) may need less restrictive permissions during installation, and then can be dialed back to normal permissions. Any instructions or code setting the "execute" bit (1) for PHP files is automatically suspect... it's been a long time since most servers required PHP to be executable. Finally, some servers will give a 500 error for "world writable" files or directories, while others will simply silently fail to open such files or directories.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...