Thank you for your reply. I've solved it by chown'ing script file to root:root. 
But that's strange because ps aux shows that bacula director works as bacula 
user.

Regards

From: Jim Richardson [mailto:j...@securit360.com]
Sent: Monday, September 25, 2017 7:38 PM
To: bacula-users@lists.sourceforge.net; mar...@de.reuver.org
Subject: Re: [Bacula-users] Problem with script execution

Your issue most likely is with SELinux check your audit log.

Sent from my Android phone using TouchDown 
(www.symantec.com<http://www.symantec.com>)

-----Original Message-----
From: Marcel de Reuver [mar...@de.reuver.org]
Received: Monday, 25 Sep 2017, 11:24AM
To: 
bacula-users@lists.sourceforge.net<mailto:bacula-users@lists.sourceforge.net> 
[bacula-users@lists.sourceforge.net]
Subject: Re: [Bacula-users] Problem with script execution
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 
<artem.niki...@advdigital.ru<mailto:artem.niki...@advdigital.ru>>:
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
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-users

CONFIDENTIALITY: This email (including any attachments) may contain 
confidential, proprietary and privileged information, and unauthorized 
disclosure or use is prohibited. If you received this email in error, please 
notify the sender and delete this email from your system. Thank you.
------------------------------------------------------------------------------
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
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to