Posts: 26
Threads: 5
Joined: Dec 2014
Reputation:
0
Thanks: 2
Given 2 thank(s) in 2 post(s)
CRON not executing
12-23-2014, 11:01 AM
hi, trying to execute cron but its not being run.
For a test page sends email when its being accessed, when accessed manually page sends email just fine.
My configuration: api_deliverymark_com/api/cron/index.php
Per note 1: /var/sentora/hostdata/1874mark/public_html/
Job ste to run every min
nothing happens.
I look at cron log and here is what i see:
Code: Dec 22 19:54:01 ny05 CROND[30752]: (apache) CMD (php -d suhosin.executor.func.blacklist="passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec" -d open_basedir="/var/sentora/hostdata/1874mark/:/var/sentora/temp/" /var/sentora/hostdata/1874mark/public_html/api_deliverymark_com/api/cron/index.php)
I have no idea what the 1st parts is but i see request is handled by PHP parser and path seams to be correct. yet nothing happens.
I would use WGET as alernative but UI limits me to spesify direct path only.
Any help?
tnx!
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: CRON not executing
12-23-2014, 05:07 PM
Did the script require extended permissions? Like exec function or suhosin disabled?
M B
Posts: 273
Threads: 40
Joined: Nov 2014
Reputation:
5
Sex: Male
Thanks: 168
Given 42 thank(s) in 22 post(s)
RE: CRON not executing
12-23-2014, 06:58 PM
Correct
Code: /api_deliverymark_com/api/cron/index.php
Posts: 26
Threads: 5
Joined: Dec 2014
Reputation:
0
Thanks: 2
Given 2 thank(s) in 2 post(s)
RE: CRON not executing
12-24-2014, 02:26 AM
(This post was last modified: 12-24-2014, 02:28 AM by alexus.)
(12-23-2014, 05:07 PM)Me.B Wrote: Did the script require extended permissions? Like exec function or suhosin disabled?
Not that i know of, its regular PHP page on the site. So as long as its run by Apache or PHP them it would execute just fine. One thing that comes to mind is that i uploaded the page via SSH with root account, so owner is root. Maybe I can try to change owner to Apache
(12-23-2014, 06:58 PM)Cantalupo Wrote: Correct
Code: /api_deliverymark_com/api/cron/index.php
I dont think leading slash is appropriate, i tried both and both did not work, but when i use leading slash i get // in log, so i removed it to have proper path in logs. In both cases single and double slash should work in linux.
Posts: 26
Threads: 5
Joined: Dec 2014
Reputation:
0
Thanks: 2
Given 2 thank(s) in 2 post(s)
RE: CRON not executing
12-24-2014, 03:25 AM
just changed owner and group to apache:apache
with 0774 permissions but still no luck
Posts: 26
Threads: 5
Joined: Dec 2014
Reputation:
0
Thanks: 2
Given 2 thank(s) in 2 post(s)
RE: CRON not executing
12-24-2014, 03:28 AM
oh wait.... with delay of 3 min something started to come in ))) yay !
well came in once and not more. hm
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: CRON not executing
12-24-2014, 03:48 AM
Owner should be apache:apache as the cron job execute under that user. Why would have another owner? Did you upload using SSH or FTP account?
M B
Posts: 3 ,662
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: CRON not executing
12-24-2014, 04:34 AM
SSH upload... (read his posts silly! )
One thing to remember for the future: Always use an FTP account associated with the user's account for proper permissions. (not SSH)
Try this:
Edit the crontrab file manually and test by removing the restrictions. If it works, you will know it uses a restricted function
Code: php -d suhosin.executor.func.blacklist="passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec" -d open_basedir="/var/sentora/hostdata/1874mark/:/var/sentora/temp/" /var/sentora/hostdata/1874mark/public_html/api_deliverymark_com/api/cron/index.php
try:
Code: php /var/sentora/hostdata/1874mark/public_html/api_deliverymark_com/api/cron/index.php
If it is your own site and not a customer's, you may be able to leave the restrictions removed.
Go to Module Admin>Apache Admin>Override A Virtual Host Setting>api.deliverymark.com>Un-check Suhosin Enabled and OpenBase Enabled and SAVE - Wait for daemon to run.
-TGates - Project Council
SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE
Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: CRON not executing
12-24-2014, 04:47 AM
Yep I was focused on first report & this explains the issue. Cron run under apache user & ssh will upload files with root owner that would prevent cron from executing.
Not a bug. Regular FTP would fix the issue as Tom said or if you use SSH always change back owner.
M B
Posts: 26
Threads: 5
Joined: Dec 2014
Reputation:
0
Thanks: 2
Given 2 thank(s) in 2 post(s)
RE: CRON not executing
12-25-2014, 06:29 AM
TGates and Me.B - tnx! I already changed precisions to Apache:Apache will try editing cron and see what happens. if it works will try to remove restrictions. Site is my client site but they don't use server
|