help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how bash run by crontab is different from login bash shell?


From: Jesse Hathaway
Subject: Re: how bash run by crontab is different from login bash shell?
Date: Thu, 10 Sep 2020 08:38:48 -0500

I don't run Mac OS, but this part of your error message:

"file system sandbox blocked open() of
'/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath'"
https://stackoverflow.com/questions/44627957/mac-os-file-system-sandbox-blocked-open

seems to indicate that Mac OS is purposely blocking access for the cronjob,
more info on this stackoverflow post:

https://stackoverflow.com/questions/44627957/mac-os-file-system-sandbox-blocked-open


On Wed, Sep 9, 2020 at 8:05 PM Peng Yu <pengyu.ut@gmail.com> wrote:
>
> Hi,
>
> I have the following line in crontab.
>
> * * * * * LANG=en_US.UTF-8 /usr/local/bin/bash -c 'builtin enable -f
> /Users/xxx/Downloads/bash-5.0/examples/loadables/realpath realpath'
> >/tmp/crontab_stdout_realpath.log 2>/tmp/crontab_stderr_realpath.log
>
> But it prints the following error.
>
> $ cat /tmp/crontab_stderr_realpath.log
> /usr/local/bin/bash: line 0: enable: cannot open shared object
> /Users/xxx/Downloads/bash-5.0/examples/loadables/realpath:
> dlopen(/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath, 1):
> no suitable image found.  Did find:
>         file system sandbox blocked open() of
> '/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath'
>
> But the following command run in the login shell works fine. Does
> anybody know what is the difference between bash run by crontab and
> the login shell? How the error is caused? The OS is Mac OS Catalina
> 10.15.6. Thanks.
>
> $ builtin enable -f
> /Users/xxx/Downloads/bash-5.0/examples/loadables/realpath realpath
>
> --
> Regards,
> Peng
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]