0

I am using Google Cloud Functions to

  • Download a video from Google Cloud Storage Bucket
  • Overlay that video with some text
  • Upload the processed video back to Google Cloud Storage Bucket.

I am using Python MoviePy module. When running the script I get the error.

OSError: convert-im6.q16: not authorized

This is because of Image Magick Policy.xml file which has this line (that I need to comment out).

<policy domain="path" rights="none" pattern="@*"/>

Locally on docker, this works fine. When I upload it to the Cloud Function service, the error occurs when the function runs.

If I comment out the policy line locally on docker, I get the same error.

How can I update the policy.xml to

<policy domain="path" rights="read|write" pattern="@*"/>

OR

Include an override xml for this particular policy.

Google Cloud Function doesn't have/allow access to the OS.

Any thoughts?

Warren
  • 23
  • 5
  • In what directory did you uncomment it? See https://imagemagick.org/script/resources.php for the list of places. Edit it at the highest level you can. You may need owner privileges. – fmw42 Apr 02 '20 at 16:38
  • I had previously looked at that page. But that page is relevant to having editable access. On Google Cloud Functions, there is no option to edit any file from Image Magick. The file is located here on my local development Docker container. /etc/ImageMagick-6/policy.xml – Warren Apr 02 '20 at 17:09
  • Can you customize your modules locally and upload them as described [here](https://cloud.google.com/functions/docs/writing/specifying-dependencies-python#packaging_local_dependencies) – Emil Gi Apr 03 '20 at 08:59
  • 2
    Hi @Warren, have you found a solution? Having the same issue here. – tavoyne Jul 20 '21 at 09:41

0 Answers0