The difference might be something in the process's environment.  Try printing
the environment using /bin/env in the script to compare between the post job
and other cases.

You could also try using Bacula's bsmtp utility (or /bin/mail) instead of
mutt.

__Martin


>>>>> On Wed, 10 Apr 2019 11:46:04 +0100, Adam Weremczuk said:
> 
> Thanks Martin, it behaved just as you said.
> 
> What I'm trying to troubleshoot is a post job script failing:
> 
> 09-Apr 22:38 bacula_dir JobId 48848: AfterJob: /sent: Permission denied 
> (errno = 13)
> 09-Apr 22:38 bacula_dir JobId 48848: AfterJob: Could not send the message.
> 
> It was running fine for months until I rebooted the server on Monday.
> 
> It could be mutt trying to save the message somewhere it doesn't have 
> write access to (why the behavior has changed remains a mystery).
> 
> In order to explore this possibility I want to be able to manually 
> reproduce the problem first.
> 
> The script runs fine from shell as root and bacula as well as from 
> director's bconsole as part of my test job.
> 
> Am I still missing something?
> 
> 
> On 10/04/19 11:17, Martin Simmons wrote:
> >> No, you must provide valid values for pool, client etc.  However, Admin 
> >> jobs
> >> will not actually use them for anything.
> >>
> >> __Martin
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to