# Cron job error

**URL:** <https://community.freepbx.org/t/cron-job-error/79943>\
**Category:** General Help\
**Created:** [December 14, 2021, 5:38pm UTC](https://community.freepbx.org/t/cron-job-error/79943 "2021-12-14T17:38:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![frogphone](https://community.freepbx.org/letter_avatar_proxy/v4/letter/f/e56c9b/32.png) [@frogphone](https://community.freepbx.org/u/frogphone)\
**Post date:** [December 14, 2021, 5:38pm UTC](https://community.freepbx.org/t/cron-job-error/79943/1 "2021-12-14T17:38:07Z")

</div>

```auto
root@raspberrypi:~# fwconsole job --run
Running dashboard::scheduler...Done
Running calendar::sync...Starting Calendar Sync...
Finished
Done
Running timeconditions::schedtc...proc_open(/tmp/cron.error): failed to open stream: Permission denied

```

```auto
root@raspberrypi:~# fwconsole reload
Reload Started

In Cron.class.php line 281:

  proc_open(/tmp/cron.error): failed to open stream: Permission denied

reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]

```

---

<div class="post-metadata">

**Author:** ![adell4444](https://community.freepbx.org/user_avatar/community.freepbx.org/adell4444/32/21492_2.png) [@adell4444](https://community.freepbx.org/u/adell4444)\
**Post date:** [December 14, 2021, 5:40pm UTC](https://community.freepbx.org/t/cron-job-error/79943/2 "2021-12-14T17:40:49Z")

</div>

Try running

```
fwconsole chown
```

---

<div class="post-metadata">

**Author:** ![frogphone](https://community.freepbx.org/letter_avatar_proxy/v4/letter/f/e56c9b/32.png) [@frogphone](https://community.freepbx.org/u/frogphone)\
**Post date:** [December 14, 2021, 5:47pm UTC](https://community.freepbx.org/t/cron-job-error/79943/3 "2021-12-14T17:47:08Z")

</div>

```auto
root@mainpi4:~# fwconsole chown
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 3 seconds
Setting specific permissions...
 10996 [============================]
Finished setting permissions

```

Same errors if I run `fwconsole reload` after 😕

---

<div class="post-metadata">

**Author:** ![frogphone](https://community.freepbx.org/letter_avatar_proxy/v4/letter/f/e56c9b/32.png) [@frogphone](https://community.freepbx.org/u/frogphone)\
**Post date:** [December 16, 2021, 6:01pm UTC](https://community.freepbx.org/t/cron-job-error/79943/4 "2021-12-16T18:01:15Z")

</div>

Any other debug info I can provide?

---

<div class="post-metadata">

**Author:** ![jfinstrom](https://community.freepbx.org/user_avatar/community.freepbx.org/jfinstrom/32/12705_2.png) [@jfinstrom](https://community.freepbx.org/u/jfinstrom)\
**Post date:** [December 16, 2021, 6:26pm UTC](https://community.freepbx.org/t/cron-job-error/79943/5 "2021-12-16T18:26:46Z")

</div>

chown doesn’t touch /tmp

Try `rm -f /tmp/cron.error` the file will regenerate.

---

<div class="post-metadata">

**Author:** ![sholinaty](https://community.freepbx.org/user_avatar/community.freepbx.org/sholinaty/32/18987_2.png) [@sholinaty](https://community.freepbx.org/u/sholinaty)\
**Post date:** [December 16, 2021, 7:19pm UTC](https://community.freepbx.org/t/cron-job-error/79943/6 "2021-12-16T19:19:59Z")

</div>

any chance it runs differently as the user `asterisk` as opposed to `root` ?

---

<div class="post-metadata">

**Author:** ![frogphone](https://community.freepbx.org/letter_avatar_proxy/v4/letter/f/e56c9b/32.png) [@frogphone](https://community.freepbx.org/u/frogphone)\
**Post date:** [December 16, 2021, 8:10pm UTC](https://community.freepbx.org/t/cron-job-error/79943/7 "2021-12-16T20:10:53Z")

</div>

That seems to have resolved it!

`rm -f cron.error`, then `fwconsole chown`, then `fwconsole reload` outputs like normal. I ran `fwconsole reload` to make sure

---

<div class="post-metadata">

**Author:** ![system](https://community.freepbx.org/uploads/default/original/3X/f/7/f7056d57e04fdbf71c6ad967e1ced351317f5c3f.png) [@system](https://community.freepbx.org/u/system)\
**Post date:** [December 23, 2021, 8:11pm UTC](https://community.freepbx.org/t/cron-job-error/79943/8 "2021-12-23T20:11:28Z")

</div>

Closed on December 23, 2021, 8:11pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
