convert:not authorized `aaaa` @ error/constitute.c/ReadImage/453

后端 未结 11 2421
无人及你
无人及你 2020-11-27 08:50

I want to create a captcha pic by use convert from ImageMagick.

And I follow this, but there are some problem .

Input In my linux shell:

11条回答
  •  感情败类
    2020-11-27 09:36

    I use many times the ImageMagic convert command to convert *.tif files to *.pdf files.

    I don't know why but today I began to receive the following error:

    convert: not authorized `a.pdf' @ error/constitute.c/WriteImage/1028.
    

    After issuing the command:

    convert a.tif a.pdf
    

    After reading the above answers I edited the file /etc/ImageMagick-6/policy.xml

    and changed the line:

    policy domain="coder" rights="none" pattern="PDF" 
    

    to

    policy domain="coder" rights="read|write" pattern="PDF"
    

    and now everything works fine.

    I have "ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28" on "Ubuntu 16.04.5 LTS".

提交回复
热议问题