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

ImageMagic的convert、mogrify命令报错没有权限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”

同样道理,如果遇到以下报错:

mogrify-im6.q16: attempt to perform an operation not allowed by the security policy `@t.txt’ @ error/property.c/InterpretImageProperties/3706

也是编辑/etc/ImageMagick-6/policy.xml 这个神奇的文件:

  <policy domain="delegate" rights="none" pattern="URL" />
  <policy domain="delegate" rights="none" pattern="HTTPS" />
  <policy domain="delegate" rights="none" pattern="HTTP" />
  <!-- in order to avoid to get image with password text -->
  <policy domain="path" rights="read|write" pattern="@*"/>
  <!-- disable ghostscript format types -->
  <policy domain="coder" rights="none" pattern="PS" />
  <policy domain="coder" rights="none" pattern="PS2" />
  <policy domain="coder" rights="none" pattern="PS3" />
  <policy domain="coder" rights="none" pattern="EPS" />
  <policy domain="coder" rights="none" pattern="PDF" />
  <policy domain="coder" rights="none" pattern="XPS" />

例如这里是@t.txt 报错,对应的就是修改pattern=”@*”这一行,把none改为read|write 。

同样,如果其他例如pdf的报错,Xps的报错,把none改为“read|write”就ok了。

京ICP备11047313号-21