|
Posted by Petr Vileta on 09/07/06 22:41
<ph1975@gmail.com> wrote in
news:1157664545.977103.188170@e3g2000cwe.googlegroups.com...
> Hi Folks,
>
> the following problem occured:
>
> i use imagemagick (Version: ImageMagick 6.2.2 05/26/05 Q16 on Fedora
> Core 3 Server)
> When i manually (on bash) execute:
>
> /usr/bin/convert -size 300x267
> /var/www/html/web4/html/_img/_2/b28a3240dffa1cad3dab0e877a3d7c5e.jpg
> -resize 126x100+0+-6 +profile "*"
> /var/www/html/web4/html/_img/_2/_tn/t_b28a3240dffa1cad3dab0e877a3d7c5e.jpg
>
> it works. (i am root)
>
> executing the same within a PHP Script with system(... command as shown
> above ...);
>
> i get the following output:
> convert: unable to open image
> `/var/www/html/web4/html/_img/_2/fa1d0a1d407f077aa98c8498b3e8be7d.jpg':
> Permission denied.
>
>
> The /var/ folder belongs to root and has chmod 755
> /var/www/ has 777 (root),
> /var/www/web4/ has 777 (apache --> the httpd runs on user
> apache:apache),
> /var/www/web4/html/ ... till _img/_2/.... has 777 and is
> apache:apache.
>
> I really don't get this.... can anyone give me a hint? Even googling
> didn't resolve this issue.
>
I will solve this not long ago :-)
I'm not sure if this is not a security hole but this work for me.
/var/ must have provileges 77x
/var/www/ 77x
/var/www/web4/ 77x
/var/www/web4/html/ 77x
and for all directories the group must be some group where "apache" is a
member of this group.
And at the end you MUST RESTART Apache ;-) because Apache is running using
privileges readed at start time.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
Navigation:
[Reply to this message]
|