Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

File Permissinos


knichel

Recommended Posts

I installed osCommerce and have been trying to deal with file permissions. I was going to edit the file index.php for the english language and got the following error...

 

Error Error: I can not write to this file. Please set the right user permissions on: /home/eenamaria/www/store/includes/languages/english/index.php

 

As I understand it, I must use the perms for everyone since all of the files in my web root are owned by me and the group is also set to me. In order to allow the web server to write the files, I must set the perms for everyone to rw-. Isn't this a bit of a security problem?

 

So how do I deal with this since the physical server does not belong to me and I cannot chgrp on these files?

 

Oh, so what should teh file perms be on the files for osCommerce?

 

--

Tia,

Mike

Link to comment
Share on other sites

All of the php files only need to be readable to all. When you want to change them you can change them to readable/writable while you are editing them. Of course all the images and tmp directories downloads pubs should be readable and writable for all. The installation readme has this detail as well.

 

That message from the File Manger Editor is just stating that you only have read access to that file. This ok, until you want to edit then you'll need to change the permissions to read and write via your host control panel or via FTP.

 

However, don't use the File Manager Editor from osCommerce on any of your files. There is a bug that will change ALL escaped 's (ie. What\'s New) by removing the the escape character and then causing PHP parse errors. Use your own editor locally and then ftp the file to your server.

 

HTH

Tom

Link to comment
Share on other sites

Ok, I will look for the notes for installing and set perms as described...

 

 

On another note...

*snip*

However, don't use the File Manager Editor from osCommerce on any of your files. There is a bug that will change ALL escaped 's (ie. What\'s New) by removing the the escape character and then causing PHP parse errors. Use your own editor locally and then ftp the file to your server.

 

HTH

Tom

 

I was looking at the filemanager code and I see...

 

case 'save':

if ($fp = fopen($current_path . '/' . $HTTP_POST_VARS['filename'], 'w+')) {

fputs($fp, stripslashes($HTTP_POST_VARS['file_contents']));

fclose($fp);

tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' urlencode($HTTP_POST_VARS['filename'])));

}

break;

 

Why are you stripping the slashes at this point? Shouldn't you just read the file strip the slashes and display then re-addslashes before writing?

 

Not sure, but this might better be posted in a different forum?

Link to comment
Share on other sites

You are correct and that's where the bug lies. It is a known bug and has been reported and should be resolved in MS3. Check out bug forum if you need details on this.

 

In the meantime, I'd just learn to not use it or better yet delete it.

 

Tom

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...