<?php
require('includes/application_top.php');
require('includes/configure.php');
$image_query = tep_db_query("select products_image from products");
while ( $info = tep_db_fetch_array($image_query) )
{
$target = DIR_FS_CATALOG . DIR_WS_IMAGES . $info['products_image'];
echo $target . "<br>n";
chmod( $target, 0646 );
}
?>Then load it into your browser (http://..../admin/chmodimages.php). You should see a list of all your images and the ones that belong to nobody will have their permissions set to 646. You can set the permissions for the ones that belong to you using normal methods in telnet or FTP.To fix this problem for future uploads, other posts have recommended adding this line
chmod( $target, 0646 );right after this line
move_uploaded_file($filename['tmp_name'], $target);in admin/includes/functions/general.php.














