Page 1 of 1

Apache user need special permissions?

Posted: 2009-11-27T09:01:36-07:00
by Nicarlo
Hey there,

I just recently installed the latest imagemagick on my centos 5.4 machine.

After the installation

[root@MTL1 ~]# convert --version
Version: ImageMagick 6.5.7-10 2009-11-24 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP

When i run imagemagick commands through the shell all is good but when my php script exec('convert --logo.gif') it does not work. I have made sure that php exec is enabled but it seems that apache or www-data user doesnt seem to have permissions to use any of the imagemagick commands.

imagemagick was installed with root user but i have tested it with random shell users and it worked fine.

are there special permissions that i have to give these web users?

any help on this would be greatly appreciated!

Re: Apache user need special permissions?

Posted: 2009-11-29T18:12:37-07:00
by anthony
Apache under cento runs as user 'apache' which may not have write access to various directories.

Also Centos as a redhat linux, uses SELinux security protection. This means that unless extra attributes have been defined the web server spawned processes may not have access to various commands or directories. Check the log files!

A lot of people tend to disable SELinux because of this pain.