convert: not authorized 'fileName' @ error/constitute.c/ReadImage/412.

Symptons

Usually this error is shown in the log raised by thumbnail conversion process.

com.openkm.core.ConversionException: convert: not authorized `/home/openkm/tomcat/temp/okm7875536703993950444.pdf' @ error/constitute.c/ReadImage/412.
convert: no images defined `/home/openkm/tomcat/temp/okm1433820293602267476.png' @ error/convert.c/ConvertImageCommand/3210.

	at com.openkm.util.DocConverter.pdfPage2img(DocConverter.java:952) ~[DocConverter.class:na]

Cause

After some ImageMagick version upgrade the Imagemagick policy does not authorize working with the file.

Solution

Edit the ImageMagick policy.xml file and comment the bottom policy rules what is affecting your file.

$ vim /etc/ImageMagick/policy.xml

Or maybe (depending on your Linux distro and version):

$ vim /etc/ImageMagick-6/policy.xml


The ImageMagick folder name might change based in application version

The file before:

...
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
...

The file after:

<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />

Properties

Properties

Date

2018-10-05

Applies to

  • Core

 

Keywords

  • AllVersions
  •