If Bacula needs to run a script as root you better add some lines to
/etc/sudoers.

[...]
# User alias specification
User_Alias SYS_USER = bacula

# Cmnd alias specification
Cmnd_Alias BACULA = /path/to/your/script, /path/to/other/script

# User privilege specification
root ALL=(ALL:ALL) ALL
SYS_USER ALL = (ALL) NOPASSWD: BACULA
[...]

Change your After Job into:
  Run After Job = "sudo /path/to/your/script"

Best regards,
Marcel

2017-09-25 16:43 GMT+02:00 Nikitin Artem <[email protected]>:

> Hello all, i’m trying to implement a job with script execution on job
> completion. But I’ve got an error message:
>
>
>
> *bacula-srv JobId 26: Error: Runscript: AfterJob returned non-zero
> status=200. ERR=Permission denied*
>
>
>
> I know that there is permissions problem, but I was  chmod’ed to 777 and
> chown’ed to root:bacula and the error message are still there. . .
>
> Any idea?
>
> Regards.
>
>
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Bacula-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to