Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help! Security Directory Permissions


Guest

Recommended Posts

Hi

 

I have recently installed osc2.3.3.1 after a couple years using osc2.1.x

 

I am not very familar with many features of osc 2.3.x, I attached an image and need someone to give me an advise on if my folders's permissions are set correctly?

 

I think all folders' permissions were set by default, apart from a couple certain folders that i had to give 'writable' permission. How come in the Admin --> Tools --> Security Directory Permissions page, most of my folders where not set correctly? what is the actual function of the 'Security Directory Permissions page'?

 

FULL IMAGE IS IN MY REPLY POST.

 

Thanks

K

post-280345-0-67492500-1377970838_thumb.jpg

Link to comment
Share on other sites

Directories 755 and files 644 are your typical starting points for Read-Write by owner and Read-Only by everyone else. Note that some hosts have other conventions, such as 705 and 604. Now you have to determine which of the three permissions (owner, group, world) PHP runs under, which permits osC to write to files or directories. If it runs as "owner", you're done -- PHP (and osC) can write to anything. If as "group", you need 775 and 664 for those directories and files that osC needs to write to. In some poorly configured servers, PHP runs as "world" (a random user), and you need to be at 777 and 666. Those settings are dangerous because anyone else sharing your server can then write your files and directories. If you need to use them, try to make only the minimum set of directories and files world-writable, and set them back to 755/644 when done installing your add-on or whatever you're doing. I don't recall there being anything in osC that requires 24x7 Read-Write access by PHP.

 

The two configure.php files are a special case. osC wants you to set them so that it (PHP) can't write to them, for safety. If PHP runs as "owner", this requires 444 permissions. If PHP runs as group or world, 644 should be safe. osC will tell you if it thinks it can write to those two files. It shouldn't hurt to go to 444 once you're done adjusting the settings, so that you can't accidentally mangle the files, either.

 

I can't answer why the security directory permissions page didn't work right for you -- perhaps it's set up for PHP running as owner, and yours is not (or vice-versa)? Be sure to check that you are listed as the "owner" of everything, so that you have the right to set permissions.

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...