Each time I want to convert jpg file to pdf by this command

convert *.jpg pictures.pdf

I have this error message:

convert: not authorized `pictures.pdf' @ error/constitute.c/WriteImage/1028.
  • 1
    convert *.jpg pictures.pdf will overwrite all pdf files as one file pictures.pdf? – Vijay Oct 7 '18 at 17:11

This problems comes from a security update: https://launchpad.net/ubuntu/+source/imagemagick/8:

Someone reported it as a bug: https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1796563

As a temporary fix, I edited /etc/ImageMagick-6/policy.xml and changed the PDF rights from none to read|write there. Not sure about the implications, but at least it allows me to get things done.

  • Thanks man its works successfully – Adon Naaman Oct 7 '18 at 18:01
  • I looked into it again, and I'm almost certain that the security fix is related to kb.cert.org/vuls/id/332928 (which documents various ways to bypass -dSAFER in ghostscript). – YoungFrog Oct 9 '18 at 13:13
  • 1
    This indeed works as advertized. I simply commented out (effectively removed) the pdf-line. It would be good to know what the side-effects would be! The policymap in the config file comments that this is for "disable ghostscript format types". – Marten Koetsier Oct 22 '18 at 12:00
  • 1

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.