Images do not show or have 403 error or permissions errors

If site images do not show , and when you view the image in the browser directly you receive a 403 or permission error, most likely the permissions are off.

Version 2.7 or higher: Open the config.php page in the /sbconf/ folder, and change the line:

define("SB_SET_CHMOD_VAL", "n");

to:

define("SB_SET_CHMOD_VAL", "y");

and save the file.

Version 2.62: Open the config.php page in the /sbconf/ folder, and change the line:

$set_chmod_val = "n";

to:

$set_chmod_val = "y";

and save the file.

Version 2.55 or lower: There is no permission setting. To add the permissions:

  1. Open the images.php page in the /storeadmin/ folder.

  2. Find the line:

    if (move_uploaded_file($_FILES['addimg']['tmp_name'], $rel_img))
    {

    and under it, add:

    @chmod ($rel_img, 0644);
  3. Find the lines:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    {

    and just under that, add:

    @ftp_site($ftp_con, "CHMOD 0644 $ftp_path/$abs_img");
  4. Open the imgload.php page in the /includes/ folder of the /storeadmin/ folder.

  5. Find the line:

    if (move_uploaded_file($_FILES['fileone']['tmp_name'], $rel_img_one))
    $loadone = "y";

    and change it to:

    if (move_uploaded_file($_FILES['fileone']['tmp_name'], $rel_img_one))
    {
    @chmod ($rel_img_one, 0644);
    $loadone = "y";
    }
  6. Find the lines:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    $loadone = "y";

    and chage them to:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    {
    @ftp_site($ftp_con, "CHMOD 0644 $ftp_path/$abs_img_one");
    $loadone = "y";
    }
  7. Find the line:

    if (move_uploaded_file($_FILES['filetwo']['tmp_name'], $rel_img_two))
    $loadtwo = "y";

    and change it to:

    if (move_uploaded_file($_FILES['filetwo']['tmp_name'], $rel_img_two))
    {
    @chmod ($rel_img_two, 0644);
    $loadtwo = "y";
    }
  8. Find the lines:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    $loadtwo = "y";

    and change them to:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    {
    @ftp_site($ftp_con, "CHMOD 0644 $ftp_path/$abs_img_two");
    $loadtwo = "y";
    }
  9. Open the insert_image.php page from the /popups/ folder inside the /htmlarea/ folder in /storeadmin/.

  10. Find the lines:

    if (move_uploaded_file($_FILES['uplImage']['tmp_name'], $rel_img))
    {

    and under it, add:

    @chmod($rel_image, 0644);
  11. Find the lines:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    $upl_Image = $abs_img;

    and change them to:

    if ($ftp_con AND $ftp_login AND $ftp_load_file)
    {
    @ftp_site($ftp_con, "CHMOD 0644 $ftp_path/$abs_img");
    $upl_Image = $abs_img;
    }
  12. Save and reload changed files.