astroumd / lmtoy

Toy Codes for LMT
https://www.astro.umd.edu/~teuben/LMT/lmtoy/html/
0 stars 2 forks source link

converting PDF to PNG using imagemagick needs root permission #41

Open teuben opened 1 year ago

teuben commented 1 year ago

On standard ubuntu ImageMagick doesn't have enough permission, and the RSR waterfall plot is not created:

  convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
  convert-im6.q16: no images defined `rsr.wf.png' @ error/convert.c/ConvertImageCommand/3258.

the solution is to edit /etc/ImageMagick-*/policy.xml:

  rights="read | write" pattern="PDF" 
teuben commented 1 year ago

A non-root solution is to use $LMTOY/etc/policy.xml and copy it to ~/.config/ImageMagick/policy.xml