Error while running command before snapshot: error running non-essential action command: fork/exec /home/akash/stop.sh: permission denied

So,
I’m setting up Kopia so that I can backup my docker volumes.
I want to stop containers before taking the snapshot and for that I’ve defined the policy as well.
My stop.sh scripts looks like below:

#!/bin/bash
docker stop miniflux-db-1

Then in script to run before snapshot edit field I’m entering the path of the script such as:
/home/akash/stop.sh
However, when I’m taking the snapshots, the container is not getting stopped.
When I checked the logs:
It showed this error:

15:10:01.387 error running non-essential action command: fork/exec /home/akash/stop.sh: permission denied

Am I doing something wrong?
Please help

Do you have the execute bit set on the script, appropriate for the user running kopia at that point?

Yes, that was an issue.
Just set the execute perms and now it’s fine :slight_smile: Thanks

1 Like