Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

chmod problem on install


elterry

Recommended Posts

Hi : :(

 

I have installed OSc 2.2 milestone. My catalog says Warning: I am able to write to the configuration file: /home/elterry/public_html/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

 

I have treble checked this and have reset the chmod several times. Nothing makes any difference. Is there a way to must make this message go away?

Thanks

 

EL T

Link to comment
Share on other sites

have you tried chmod 444 read only state for this file some setups require this level of chmod.

 

Is this a windows or *nix setup

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi

Tried that. On my Linux server, I put in chmod value 444 and it returns to 644. I can get 400, or 600, but not 444. The bit it won't accept is the write permission. I uncheck the box, click apply, ok, when i come to check the properties, its back to 644, or whatever. The one I need to get rid of is the owner/write permission check. It will not allow that.

 

Cheers

 

EL T

Link to comment
Share on other sites

Create a php file named "secure.php" or whatever. Put the following code in it:

 

<?php 
chmod('includes/configure.php', 0444); 
?>

 

Upload this file to your server in the Catalog folder. Then run it in your browser: http://www.yourwebsite.com/catalog/secure.php

 

Nothing will show on the screen, but the file will run and will set the permissions.

I'd rather be flying!

Link to comment
Share on other sites

Create a php file named "secure.php" or whatever. Put the following code in it:

 

<?php 
chmod('includes/configure.php', 0444); 
?>

 

Upload this file to your server in the Catalog folder. Then run it in your browser: http://www.yourwebsite.com/catalog/secure.php

 

Nothing will show on the screen, but the file will run and will set the permissions.

Now that's a good idea!

 

It's probably been posted before but I haven't seen it. Easy way for all the people that have problems with other methods.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

It's also a good one for people that have trouble changing permissions back. Just change the number to the desired settings.

 

I know that on some server accounts some of my ftp type programs work like a charm on others not so well. It depends on the protections the host built into the server account I guess.

 

I've added this thread to my little excel database of fixes for newbies.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

  • 4 weeks later...
Create a php file named "secure.php" or whatever. Put the following code in it:

 

<?php 
chmod('includes/configure.php', 0444); 
?>

 

Upload this file to your server in the Catalog folder. Then run it in your browser: http://www.yourwebsite.com/catalog/secure.php

 

Nothing will show on the screen, but the file will run and will set the permissions.

I'm having a similar problem with one of my clients using OS Commerce. I can't quite figure out what version of OS Commerce is running but i know it's over a year old.

 

The site was working fine until we switched hosting providers to A really nice setup with redhat linux. Its shared hosting with about 3 other very small sites on the same box.

 

The only problem we're running into is when she uploads new images of products the file permissions on the images is being set to 600 instead of 644. The images are failing to display because of this. When i manually chmod the images to 644 they display fine.

 

I've done a few searches on the source code looking for $permissions but havn't turned up anything useful.

 

We'd like to either track down the section of script that controls setting the file permissions and make sure it's ok or as a work-around set up a php script that will go through all the files in the images directory and set them all to 644. I know there's a way to do the latter but i'm not familiar enough with PHP to do that. Can anyone help with either possible solution?

 

I'm not sure if i'll get notified when someone else posts to this so please drop me a line at [email protected] if you get a chance. Thanks!

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 1 year later...
  • 2 weeks later...
  • 1 year later...

Hi, I found this in the faq of the control panel of my website:

 

My software installation instructions say that I should set the permissions to world-writable (777 or 666), but I don't see these permissions in the File Manager ...?

You should not do this on our servers, since we have SuExec installed. With this security mechanism, there is no need for setting world-writable permissions for your files and folders, since your PHP/CGI scripts will run as your own user. Furthermore, permissions 666 and 777 are considered insecure on our servers, and running any scripts with such permissions will result in an Internal Server Error. Please leave the default permissions (775), and the application you are trying to install should work (in most cases). If you experience any problems, please let us know where you uploaded it, and we will try to help.

 

I don't know what SuExec is, and after a lot of searching I try the solution by bluepony, and it works without problems...

Tanks! ! !

Link to comment
Share on other sites

Create a php file named "secure.php" or whatever. Put the following code in it:

 

<?php 
chmod('includes/configure.php', 0444); 
?>

 

Upload this file to your server in the Catalog folder. Then run it in your browser: http://www.yourwebsite.com/catalog/secure.php

 

Nothing will show on the screen, but the file will run and will set the permissions.

 

Very nice patch. I had the same problen with configure.php and this solved the problem :D

Link to comment
Share on other sites

  • 11 months later...

This is the error I'm receiving when trying to install OsCommerce

 

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):

 

/home/sakari/public_html/catalog/includes/configure.php

/home/sakari/public_html/catalog/admin/includes/configure.php

 

Created the secure.php file and uploaded to the Catalog folder as mentioned above and when I run it in the browser, I get this message.

 

Warning: chmod() [function.chmod]: Operation not permitted in /home/sakari/public_html/catalog/secure.php on line 2

 

and I still get an error in the installation process. Please help!!!

 

Thanks!

 

---

 

Never mind, I got it to work...

 

I just changed the file attributes to full writable... ;)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...