Policy file location

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wormboyslim
Posts: 2
Joined: 2016-05-10T01:48:14-07:00
Authentication code: 1151

Policy file location

Post by wormboyslim »

I am attempting to set policy limits and I need to do this for a whole range of hosts via puppet.

Becasue of this I would like to place the config in a global place that will be honoured regardless of image magick version.

I have some hosts with V6 and some with V7.

I have tried to place the policy.xml file in;

/etc/ImageMagick
/etc/ImageMagick/config
/usr/etc/ImageMagick
/usr/etc/ImageMagick/config
/usr/local/etc/ImageMagick
/usr/local/etc/ImageMagick/config

And none of these appear to work.

The following directory does exist, and has a blank policy that I have moved out of the way for now

/usr/lib64/ImageMagick-6.5.4/config

If I place my policy here then everything works.

My problem is I need a version-agnostic directory to put these config files in.

I am using binary packages on CentOS 6, I assume this may simply be because they built the packages without version-agnostic config directories? I'm sure this is meant to be allowed to work.

Any help greatly appreciated.

n
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Policy file location

Post by magick »

Type this command:
  • convert -debug configure logo: null:
ImageMagick looks for the policy file in the same location as its search for magic.xml. You should be able to place policy.xml in any of the folders listed with the debugging from the above command. To verify type
  • convert -list policy
to ensure its finding the expected policy file and that the configuration is as expected.
wormboyslim
Posts: 2
Joined: 2016-05-10T01:48:14-07:00
Authentication code: 1151

Re: Policy file location

Post by wormboyslim »

Thanks, that does show me the paths that I can use.

Unfortunately it also confirms that CentOS/RedHat have set their packages up to only look at versioned directories.

I won't say what I think should be done to them.
Post Reply