convert命令报错没有权限convert-im6.q16: not authorized `xxx.pdf' @ error/constitute.c/ReadImage/412.

如何删除百度上的公司信息

用ImageMagic convert命令将*.pdf文件转换为*.pdf文件。收到以下错误:

convert-im6.q16: not authorized `xxx.pdf' @ error/constitute.c/ReadImage/412.

编辑文件/etc/ImageMagick-6/policy.xml

policy domain="coder" rights="none" pattern="PDF"
改为
policy domain="coder" rights="read|write" pattern="PDF"