imagemagick - convert not allowed [duplicate]

What causes this problem and how can I fix it? I did some research but couldn't find anything about this particular problem.

asked Mar 20, 2019 at 14:52 763 1 1 gold badge 5 5 silver badges 4 4 bronze badges

2 Answers 2

ImageMagick has some security policies disabling some rights for security reasons. See why at the bottom of this answer.
You will have to edit a config file to re-enble the action you need.

Open /etc/ImageMagick-6/policy.xml with your favorite text editor, find the line and replace "none" by "read|write"

# Open the file sudo nano /etc/ImageMagick-6/policy.xml # find and edit the line # to : 

About ImageMagick security policy
The restricted policy is made to prevent unknown vulnerabilities coming from third party software as Ghostscript used here for PDF files. Be sure to update Ghostscript.

309 3 3 silver badges 10 10 bronze badges answered Mar 20, 2019 at 15:04 8,836 3 3 gold badges 31 31 silver badges 46 46 bronze badges

For anyone who winds up here, I recommend looking at the question this has been marked as a duplicate of. You really don't want to relax ImageMagick's security policy when there are alternatives that are both safer and more lossless than asking ImageMagick to decode JPEGs and then re-encode them as part of making a PDF.

Commented Feb 16, 2020 at 3:34

@Sqerstet :have you red the imagemagick documentation about security policy.xml ? No. ImageMagick thinks there is a security issue. Nope, they do not. The restricted policy is made to prevent unknown vulnerabilities coming from third party software as Ghostscript used here for PDF files. If Ghostscript is up to date, then no (known) issue. Have a nice day and please, read, read, read

Commented Jun 8, 2020 at 15:24

Since you chose to only read the first sentence, I have deleted it because it changes nothing. You are recommending users to disable settings which were set "for security reasons" (your words), without even explaining the implications. Sorry, but that is irresponsible.

Commented Jun 9, 2020 at 5:01

If I know I'm only going to process my own files, generated by my own scripts, I feel it is safe to disable the blockings. Is there a way to have multiple policies?

Commented Jul 26, 2020 at 19:38

Additional info: be sure, you have installed GhostScript >= 9.26. After that you can play around with policy.xml suse.com/support/kb/doc/?id=000019384

Commented Mar 17, 2021 at 7:36

Because of a known bug with security implications, the conversion to pdf is disabled in ImageMagick convert .

I suggest that you work around the problem,