You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use ImageMagick to convert pdf files to png, the ImageMagick version I am using (6.8.9-9) ships with a default policy.xml file that has no permissions for reading PDF files. I changed that policy.xml file and everything is working correctly, but I want to be able to have my own policy.xml file in a path of my choice that I can ship with my project, so I can deploy the project in a new server without having to configure the server's default policy.xml file every time.
According to ImageMagick v6 documentation the policy will be looked for in the following locations (I'm using the precompiled binary installation for Ubuntu 16.04):
So I set the env variable MAGICK_CONFIGURE_PATH to the path I put my policy file on. I would expect the convert command to find it there and use that policy to execute, but it seems to be using the one in /etc/ImageMagick-6 anyway. The policy file is correctly found when using the command to list the policy:
But I get a not authorized error. If I change the policy file in /etc/ImageMagick-6/policy.xml to allow reading PDF files, my convert command works.
I have also tried to place the policy file in the <current directory> from where I call the convert command, it also appears when I execute convert -list policy, but I still get the not authorized error unless I changed the global policy file.
System Configuration
ImageMagick version: 6.8.9-9
Environment (Operating system, version and so on): Ubuntu 16.04.4
The text was updated successfully, but these errors were encountered:
I didn't know whether to leave this one or the other one, and I didn't want it to be duplicated, but I saw v6 issues on the main repo so I left it there. I would appreciate any guidance on where to put this!
Description
I use ImageMagick to convert pdf files to png, the ImageMagick version I am using (6.8.9-9) ships with a default
policy.xml
file that has no permissions for reading PDF files. I changed thatpolicy.xml
file and everything is working correctly, but I want to be able to have my ownpolicy.xml
file in a path of my choice that I can ship with my project, so I can deploy the project in a new server without having to configure the server's defaultpolicy.xml
file every time.According to ImageMagick v6 documentation the policy will be looked for in the following locations (I'm using the precompiled binary installation for Ubuntu 16.04):
So I set the env variable
MAGICK_CONFIGURE_PATH
to the path I put my policy file on. I would expect theconvert
command to find it there and use that policy to execute, but it seems to be using the one in/etc/ImageMagick-6
anyway. The policy file is correctly found when using the command to list the policy:But I get a not authorized error. If I change the policy file in
/etc/ImageMagick-6/policy.xml
to allow reading PDF files, my convert command works.I have also tried to place the policy file in the
<current directory>
from where I call the convert command, it also appears when I executeconvert -list policy
, but I still get the not authorized error unless I changed the global policy file.System Configuration
The text was updated successfully, but these errors were encountered: