Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Cron line added didn't remain in crontab on final check. #56

Closed
RoeeJ opened this issue Feb 9, 2019 · 7 comments
Closed

Cron line added didn't remain in crontab on final check. #56

RoeeJ opened this issue Feb 9, 2019 · 7 comments

Comments

@RoeeJ
Copy link

RoeeJ commented Feb 9, 2019

Hey!
I'm looking into using these containers in prod and while testing them out I keep getting this error whenever I try applying any changes

exit: 1 Unable to continue. Cron line added didn't remain in crontab on final check. Check /tmp/cron.error for reason. in /var/www/html/admin/libraries/BMO/Cron.class.php on line 128 #0 /var/www/html/admin/modules/dashboard/Dashboard.class.php(126): FreePBX\Cron->addLine('* * * * * [ -x ...') #1 /var/www/html/admin/libraries/BMO/DialplanHooks.class.php(107): Dashboard->doDialplanHook(Object(extensions), 'asterisk', 500) #2 /data/var/lib/asterisk/bin/retrieve_conf(860): FreePBX\DialplanHooks->processHooks('asterisk', Array) #3 {main}

/tmp/cron.error content is
/var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied

I'm running the container on a Kubernetes cluster, volumes are bindmounted from the host

if I run fwconsole reload manually it seems to work fine, looks like it's only when invoked via the web UI

I'll gladly supply more information as needed.

@tiredofit
Copy link
Owner

Thanks for reporting this. This is a new one and I'm almost thinking it's bad security on FreePBXs part. This makes sense as the image runs under a non priveleged user and /var/spool/cron is restricted to root.

Would you be able to try a few tests for me?

  1. chown -R asterisk /var/spool/cron and try a Web Reload
  2. chmod -R 777 /var/spool/cron and try a Web Reload?

I am hoping that the first option will fix. Once I hear your response I'll build it into the image ASAP.

@RoeeJ
Copy link
Author

RoeeJ commented Feb 9, 2019

Ran both of them, still getting the same error

@tiredofit
Copy link
Owner

Nuts. Thanks for that. I'm not going to be able to dive deep into this until Wednesday. I did however take a peek at the FreePBX codebase in the meantime and it appears should be intelligent enough to operate in this fashion, in fact has been around for quite a few releases. Hopefully someone else who is running under Kubernetes can add some insight until I'm able to dive into this.

@RoeeJ
Copy link
Author

RoeeJ commented Feb 9, 2019

Looks like it's working if I run it in privileged mode or mount a volume at /var/spool/cron

@tiredofit
Copy link
Owner

Coming back to this, I can add to the routines to manage our own /var/spool/cron if you'd like and have them placed under the exposed volume /data ?

@RoeeJ
Copy link
Author

RoeeJ commented Apr 10, 2019

That would be great.

@tiredofit
Copy link
Owner

Added in Docker Hub tag tiredofit/freepbx:3.6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants