Convert doesn't work

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
srgmskt
Posts: 4
Joined: 2020-01-15T02:52:25-07:00
Authentication code: 1152

Convert doesn't work

Post by srgmskt »

Hello!
I've been using convert utility for a while on Linux Mint 19.3 and it worked just fine.
After system update convert doesn't work properly. While trying to convert anything even small PNG file into PDF it shows:

Code: Select all

convert-im6.q16: not authorized `out.pdf' @ error/constitute.c/WriteImage/1037
Output of identify -list resource

Code: Select all

Resource limits:
  Width: 16KP
  Height: 16KP
  Area: 128MP
  Memory: 256MiB
  Map: 512MiB
  Disk: 1GiB
  File: 768
  Thread: 8
  Throttle: 0
  Time: unlimited
I tried to update resource settings at policy.xml, but it didn't work.
Please let me know how to fix it.

Thanks

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

Re: Convert doesn't work

Post by magick »

See https://imagemagick.org/script/security-policy.php. You likely have a policy that prevents the use of the PDF coder, to confirm, type:

Code: Select all

magick -list policy
Assuming you understand the consequences of permitting PDF use, modify the rights to read | write or delete the PDF policy in your policy.xml configuration file. You should now be able to read or write PDF image files.

srgmskt
Posts: 4
Joined: 2020-01-15T02:52:25-07:00
Authentication code: 1152

Re: Convert doesn't work

Post by srgmskt »

I tried command:
magick -list policy

but terminal said that "Command 'magick' not found".

As for the link I didn't clearly get how to fix policy.xml

I tried to purge imagemagick app and re-install it, but still Convert doesn't work.

snibgo
Posts: 12704
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert doesn't work

Post by snibgo »

What version of IM do you use? For v6, use "convert". For v7, use "magick".

What does "convert -list policy" say?
snibgo's IM pages: im.snibgo.com

srgmskt
Posts: 4
Joined: 2020-01-15T02:52:25-07:00
Authentication code: 1152

Re: Convert doesn't work

Post by srgmskt »

It says:
Path: /etc/ImageMagick-6/policy.xml
Policy: Resource
name: disk
value: 1GiB
Policy: Resource
name: map
value: 512MiB
Policy: Resource
name: memory
value: 256MiB
Policy: Resource
name: area
value: 128MB
Policy: Resource
name: height
value: 16KP
Policy: Resource
name: width
value: 16KP
Policy: Delegate
rights: None
pattern: URL
Policy: Delegate
rights: None
pattern: HTTPS
Policy: Delegate
rights: None
pattern: HTTP
Policy: Path
rights: None
pattern: @*
Policy: Coder
rights: None
pattern: PS
Policy: Coder
rights: None
pattern: PS2
Policy: Coder
rights: None
pattern: PS3
Policy: Coder
rights: None
pattern: EPS
Policy: Coder
rights: None
pattern: PDF
Policy: Coder
rights: None
pattern: XPS

Path: [built-in]
Policy: Undefined
rights: None

snibgo
Posts: 12704
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert doesn't work

Post by snibgo »

srgmskt wrote:Policy: Coder
rights: None
pattern: PDF
So, can you see what the problem is?

A line in your policy.xml gives you no rights to PDF files. If you remove that line, you will have access.
snibgo's IM pages: im.snibgo.com

srgmskt
Posts: 4
Joined: 2020-01-15T02:52:25-07:00
Authentication code: 1152

Re: Convert doesn't work

Post by srgmskt »

Thank you! All works great now

Post Reply