running directory must have read-execute permissions?

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dnagirl

running directory must have read-execute permissions?

Post by dnagirl »

Hi,

I have IM6.3.4 installed on a Solaris 10 OS. I'm trying to call IM from a PHP webscript via a system call. Here are the details:

Code: Select all

$in='/path/to/source/infile.jpg';
$out='/different/path/out/outfile.jpg';

$cmd="convert -debug ALL '{$in}' -resize 600x600\> '{$out}'";
system($cmd, $result);
I've put this script in 2 different places, the root directory of my website and a subdirectory. Both directories have 711 permissions and the owner is me (not user nobody). The parent directory of my webroot has 755 permissions. The parents of the subdirectory have 711 permissions. Here's the weird part:
When the script runs in the webroot, it works. When the script runs in the subdirectory, it doesn't work. If I change the the permissions of all the parent directories of the script in the subdirectory to 755, the subdirectory script works too.

Why do the parent directories of my script need to be readable for IM to work properly even though the pwd of the script need only be executable? Neither the infile nor the outfile are in same path as either version of the scripts.

Thanks,
Jen
Post Reply