cron_run_jobs.php Error: Permission Denied

Hello, I am running a fresh install of Dolibar 4.0 on Ubuntu 14.04 LTS

I am having several unsuccessful attempts to get the schedule task / cron job working correctly. I Created the security key and placed the script to my crontab file. When I tail my dolibarr log file I see the following.

***** cron_run_jobs.php (4.0.0) pid=7815 *****
Error:tongue:ermission denied

Parsing the Log file this is the info I get.

2016-09-28 12:50:11 DEBUG ???@root User::fetch
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.email, u.job, u.skype, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id, u.admin, u.login, u.note, u.pass, u.pass_crypted, u.pass_temp, u.api_key, u.fk_soc, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid, u.statut, u.lang, u.entity, u.datec as datec, u.tms as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.photo as photo, u.openid as openid, u.accountancy_code, u.thm, u.tjm, u.salary, u.salaryextra, u.weeklyhours, u.color, u.ref_int, u.ref_ext, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state FROM llx_user as u LEFT JOIN llx_c_country as c ON u.fk_country = c.rowid LEFT JOIN llx_c_departements as d ON u.fk_state = d.rowid WHERE u.entity IS NOT NULL AND u.login = ‘vledgers01adm’
2016-09-28 12:50:11 DEBUG ???@root ExtraFields::fetch_name_optionals_label
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden FROM llx_extrafields WHERE entity IN (0,1) AND elementtype = ‘user’ ORDER BY pos
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT param, value FROM llx_user_param WHERE fk_user = 1 AND entity = 1
2016-09-28 12:50:11 DEBUG ???@root Cronjob::fetch_all
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT t.rowid, t.tms, t.datec, t.jobtype, t.label, t.command, t.classesname, t.objectname, t.methodename, t.params, t.md5params, t.module_name, t.priority, t.datelastrun, t.datenextrun, t.dateend, t.datestart, t.lastresult, t.datelastresult, t.lastoutput, t.unitfrequency, t.frequency, t.status, t.fk_user_author, t.fk_user_mod, t.note, t.nbrun, t.libname, t.test FROM llx_cronjob as t WHERE 1 = 1 AND t.status = 1 AND t.rowid LIKE ‘%%’ ORDER BY t.rowid DESC
2016-09-28 12:50:11 WARNING ???@root cron_run_jobs.php cronjobid: 1
2016-09-28 12:50:11 INFO ???@root cron_run_jobs.php:: torun line->datenextrun:28 Month09 2016 12:17 line->dateend: now:28 Month09 2016 12:50
2016-09-28 12:50:11 DEBUG ???@root Cronjob::fetch
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT t.rowid, t.tms, t.datec, t.jobtype, t.label, t.command, t.classesname, t.objectname, t.methodename, t.params, t.md5params, t.module_name, t.priority, t.datelastrun, t.datenextrun, t.dateend, t.datestart, t.lastresult, t.datelastresult, t.lastoutput, t.unitfrequency, t.frequency, t.status, t.fk_user_author, t.fk_user_mod, t.note, t.nbrun, t.maxrun, t.libname, t.test FROM llx_cronjob as t WHERE t.rowid = 1
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT transkey, transvalue FROM llx_overwrite_trans where lang=‘en_US’
2016-09-28 12:50:11 DEBUG ???@root User::fetch
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.email, u.job, u.skype, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id, u.admin, u.login, u.note, u.pass, u.pass_crypted, u.pass_temp, u.api_key, u.fk_soc, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid, u.statut, u.lang, u.entity, u.datec as datec, u.tms as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.photo as photo, u.openid as openid, u.accountancy_code, u.thm, u.tjm, u.salary, u.salaryextra, u.weeklyhours, u.color, u.ref_int, u.ref_ext, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state FROM llx_user as u LEFT JOIN llx_c_country as c ON u.fk_country = c.rowid LEFT JOIN llx_c_departements as d ON u.fk_state = d.rowid WHERE u.entity IS NOT NULL AND u.login = ‘vledgers01adm’
2016-09-28 12:50:11 DEBUG ???@root ExtraFields::fetch_name_optionals_label
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden FROM llx_extrafields WHERE entity IN (0,1) AND elementtype = ‘user’ ORDER BY pos
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT param, value FROM llx_user_param WHERE fk_user = 1 AND entity = 1
2016-09-28 12:50:11 DEBUG ???@root Cronjob::run_jobs jobtype=method userlogin=vledgers01adm
2016-09-28 12:50:11 DEBUG ???@root BEGIN Transaction
2016-09-28 12:50:11 DEBUG ???@root Cronjob::update
2016-09-28 12:50:11 DEBUG ???@root sql=UPDATE llx_cronjob SET label=‘RecurringInvoices’, jobtype=‘method’, command=’’, classesname=‘compta/facture/class/facture-rec.class.php’, objectname=‘FactureRec’, methodename=‘createRecurringInvoices’, params=’’, md5params=’’, module_name=‘facture’, priority=0, datelastrun=‘20160928125011’, datenextrun=‘20160928121700’, dateend=null, datestart=‘20160928103600’, datelastresult=‘20160928125001’, lastresult=’’, lastoutput=’’, unitfrequency=86400, frequency=1, status=1, fk_user_mod=1, note=‘Generate recurring invoices’, nbrun=31, maxrun=null, libname=null, test=’’ WHERE rowid=1
2016-09-28 12:50:11 DEBUG ???@root COMMIT Transaction
2016-09-28 12:50:11 DEBUG ???@root Cronjob::run_jobs START FactureRec->createRecurringInvoices();
2016-09-28 12:50:11 INFO ???@root createRecurringInvoices
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid FROM llx_facture_rec WHERE frequency > 0 AND (date_when IS NULL OR date_when <= ‘20160928235959’) AND (nb_gen_done < nb_gen_max OR nb_gen_max = 0)
2016-09-28 12:50:11 DEBUG ???@root BEGIN Transaction
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT f.rowid, f.titre, f.fk_soc, f.amount, f.tva, f.total, f.total_ttc, f.remise_percent, f.remise_absolue, f.remise, f.date_lim_reglement as dlr, f.note_private, f.note_public, f.fk_user_author, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.fk_account, f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.usenewprice, f.auto_validate, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture_rec as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.rowid=1
2016-09-28 12:50:11 DEBUG ???@root FactureRec::fetch_lines
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.info_bits, l.total_ht, l.total_tva, l.total_ttc, l.rang, l.special_code, l.fk_unit, l.fk_contract_line, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet_rec as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 1 ORDER BY l.rang
2016-09-28 12:50:11 INFO ???@root createRecurringInvoices Process invoice template id=1, ref=Testing 99PP
2016-09-28 12:50:11 DEBUG ???@root MultiCurrency::getIdFromCode
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid FROM llx_multicurrency WHERE code = ‘’
2016-09-28 12:50:11 INFO ???@root Facture::create user=1
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm, s.status, s.price_level, s.tms as date_modification, s.phone, s.fax, s.email, s.skype, s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.webservices_url, s.webservices_key, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj, s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.fk_shipping_method, s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms, s.fk_multicurrency, s.multicurrency_code, fj.libelle as forme_juridique, e.libelle as effectif, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code, i.libelle as libelle_incoterms FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_country as c ON s.fk_pays = c.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id LEFT JOIN llx_c_incoterms as i ON s.fk_incoterms = i.rowid WHERE s.rowid = 1
2016-09-28 12:50:11 INFO ???@root Societe::fetch SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm, s.status, s.price_level, s.tms as date_modification, s.phone, s.fax, s.email, s.skype, s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.webservices_url, s.webservices_key, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj, s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.fk_shipping_method, s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms, s.fk_multicurrency, s.multicurrency_code, fj.libelle as forme_juridique, e.libelle as effectif, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code, i.libelle as libelle_incoterms FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_country as c ON s.fk_pays = c.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id LEFT JOIN llx_c_incoterms as i ON s.fk_incoterms = i.rowid WHERE s.rowid = 1
2016-09-28 12:50:11 DEBUG ???@root ExtraFields::fetch_name_optionals_label
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden FROM llx_extrafields WHERE entity IN (0,1) AND elementtype = ‘societe’ ORDER BY pos
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT f.rowid, f.titre, f.fk_soc, f.amount, f.tva, f.total, f.total_ttc, f.remise_percent, f.remise_absolue, f.remise, f.date_lim_reglement as dlr, f.note_private, f.note_public, f.fk_user_author, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.fk_account, f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.usenewprice, f.auto_validate, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture_rec as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.rowid=1
2016-09-28 12:50:11 DEBUG ???@root FactureRec::fetch_lines
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.info_bits, l.total_ht, l.total_tva, l.total_ttc, l.rang, l.special_code, l.fk_unit, l.fk_contract_line, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet_rec as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 1 ORDER BY l.rang
2016-09-28 12:50:11 DEBUG ???@root Facture::calculate_date_lim_reglement
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT c.fdm,c.nbjour,c.decalage FROM llx_c_payment_term as c WHERE c.rowid=1
2016-09-28 12:50:11 DEBUG ???@root FactureRec::setValueFrom
2016-09-28 12:50:11 DEBUG ???@root sql=UPDATE llx_facture_rec SET date_last_gen = ‘20160928125011’ WHERE rowid = 1
2016-09-28 12:50:11 DEBUG ???@root FactureRec::setNextDate
2016-09-28 12:50:11 DEBUG ???@root sql=UPDATE llx_facture_rec SET date_when = “20160929000000”, nb_gen_done = nb_gen_done + 1 WHERE rowid = 1
2016-09-28 12:50:11 DEBUG ???@root Facture::create
2016-09-28 12:50:11 DEBUG ???@root sql=INSERT INTO llx_facture ( facnumber, entity, ref_ext, type, fk_soc, datec, remise_absolue, remise_percent, datef, date_pointoftax, note_private, note_public, ref_client, ref_int, fk_account, fk_facture_source, fk_user_author, fk_projet, fk_cond_reglement, fk_mode_reglement, date_lim_reglement, model_pdf, situation_cycle_ref, situation_counter, situation_final, fk_incoterms, location_incoterms, fk_multicurrency, multicurrency_code, multicurrency_tx) VALUES (’(PROV)’, 1, null, ‘0’, ‘1’, ‘20160928125011’, NULL, NULL, ‘20160928000000’, null, ‘Generated from template recurring invoice Testing 99PP’, null, null, null, NULL, null, ‘1’, null, 1, 6, ‘20160929000000’, ‘’, null, null, 0, 0, ‘’, 0, ‘USD’, 1)
2016-09-28 12:50:11 DEBUG ???@root Facture::create
2016-09-28 12:50:11 DEBUG ???@root sql=UPDATE llx_facture SET facnumber=’(PROV31)’ WHERE rowid=31
2016-09-28 12:50:11 INFO ???@root There is 0 lines that are array lines
2016-09-28 12:50:11 INFO ???@root Product::fetch id=1 ref= ref_ext=
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid, ref, ref_ext, label, description, url, note, customcode, fk_country, price, price_ttc, price_min, price_min_ttc, price_base_type, cost_price, default_vat_code, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, tosell, tobuy, fk_product_type, duration, seuil_stock_alerte, canvas, weight, weight_units, length, length_units, surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished, accountancy_code_buy, accountancy_code_sell, stock, pmp, datec, tms, import_key, entity, desiredstock, tobatch, fk_unit, fk_price_expression, price_autogen FROM llx_product WHERE rowid = 1
2016-09-28 12:50:11 DEBUG ???@root ExtraFields::fetch_name_optionals_label
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden FROM llx_extrafields WHERE entity IN (0,1) AND elementtype = ‘product’ ORDER BY pos
2016-09-28 12:50:11 INFO ???@root get_default_tva: seller use vat=0, seller country=US, seller in cee=, buyer country=US, buyer in cee=, idprod=1, idprodfournprice=0, SERVICE_ARE_ECOMMERCE_200238EC=
2016-09-28 12:50:11 INFO ???@root Product::fetch id=1 ref= ref_ext=
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid, ref, ref_ext, label, description, url, note, customcode, fk_country, price, price_ttc, price_min, price_min_ttc, price_base_type, cost_price, default_vat_code, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, tosell, tobuy, fk_product_type, duration, seuil_stock_alerte, canvas, weight, weight_units, length, length_units, surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished, accountancy_code_buy, accountancy_code_sell, stock, pmp, datec, tms, import_key, entity, desiredstock, tobatch, fk_unit, fk_price_expression, price_autogen FROM llx_product WHERE rowid = 1
2016-09-28 12:50:11 DEBUG ???@root ExtraFields::fetch_name_optionals_label
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden FROM llx_extrafields WHERE entity IN (0,1) AND elementtype = ‘product’ ORDER BY pos
2016-09-28 12:50:11 INFO ???@root get_localtax tva=0 local=1 thirdparty_buyer id=1/country_code=US thirdparty_seller id=0/country_code=US thirdparty_seller localtax1_assuj=0 thirdparty_seller localtax2_assuj=0
2016-09-28 12:50:11 INFO ???@root get_localtax tva=0 local=2 thirdparty_buyer id=1/country_code=US thirdparty_seller id=0/country_code=US thirdparty_seller localtax1_assuj=0 thirdparty_seller localtax2_assuj=0
2016-09-28 12:50:11 WARNING ???@root Facture::addline: using line label is deprecated
2016-09-28 12:50:11 DEBUG ???@root Facture::addline facid=31,desc=Test PayPal PMT,pu_ht=0.99000000,qty=1,txtva=0, txlocaltax1=0, txlocaltax2=0, fk_product=1,remise_percent=0,date_start=,date_end=,ventil=0,info_bits=0,fk_remise_except=,price_base_type=HT,pu_ttc=0,type=1, fk_unit=
2016-09-28 12:50:11 INFO ???@root Product::fetch id=1 ref= ref_ext=
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid, ref, ref_ext, label, description, url, note, customcode, fk_country, price, price_ttc, price_min, price_min_ttc, price_base_type, cost_price, default_vat_code, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, tosell, tobuy, fk_product_type, duration, seuil_stock_alerte, canvas, weight, weight_units, length, length_units, surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished, accountancy_code_buy, accountancy_code_sell, stock, pmp, datec, tms, import_key, entity, desiredstock, tobatch, fk_unit, fk_price_expression, price_autogen FROM llx_product WHERE rowid = 1
2016-09-28 12:50:11 DEBUG ???@root ExtraFields::fetch_name_optionals_label
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden FROM llx_extrafields WHERE entity IN (0,1) AND elementtype = ‘product’ ORDER BY pos
2016-09-28 12:50:11 INFO ???@root getLocalTaxesFromRate vatrate=0 local=0
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.accountancy_code_sell, t.accountancy_code_buy FROM llx_c_tva as t, llx_c_country as c WHERE t.fk_pays = c.rowid AND c.code = ‘US’ AND t.taux = 0 AND t.active = 1
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT t.localtax1, t.localtax2 FROM llx_c_tva as t inner join llx_c_country as c ON c.rowid=t.fk_pays WHERE c.code = ‘US’ AND t.active = 1 AND t.taux=( SELECT max(tt.taux) FROM llx_c_tva as tt inner join llx_c_country as c ON c.rowid=tt.fk_pays WHERE c.code = ‘US’ AND tt.active = 1 )
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT t.localtax1, t.localtax2 FROM llx_c_tva as t inner join llx_c_country as c ON c.rowid=t.fk_pays WHERE c.code = ‘US’ AND t.active = 1 AND t.taux=( SELECT max(tt.taux) FROM llx_c_tva as tt inner join llx_c_country as c ON c.rowid=tt.fk_pays WHERE c.code = ‘US’ AND tt.active = 1 )
2016-09-28 12:50:11 INFO ???@root Price.lib::calcul_price_total qty=1 pu=0.99 remise_percent_ligne=0 txtva=0 uselocaltax1_rate=0 uselocaltax2_rate=0 remise_percent_global=0 price_base_type=HT type=1 progress=100
2016-09-28 12:50:11 INFO ???@root Price.lib::calcul_price_total MAIN_ROUNDING_RULE_TOT= pu=0.99 qty=1 price_base_type=HT total_ht=0.99-total_vat=0-total_ttc=0.99
2016-09-28 12:50:11 DEBUG ???@root FactureLigne::insert rang=0
2016-09-28 12:50:11 DEBUG ???@root CommonObject::isExistingObject
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid, ref, ref_ext FROM llx_product WHERE entity IN (1) AND rowid = 1
2016-09-28 12:50:11 DEBUG ???@root FactureLigne::insert
2016-09-28 12:50:11 DEBUG ???@root sql=INSERT INTO llx_facturedet (fk_facture, fk_parent_line, label, description, qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, fk_product, product_type, remise_percent, subprice, fk_remise_except, date_start, date_end, fk_code_ventilation, rang, special_code, fk_product_fournisseur_price, buy_price_ht, info_bits, total_ht, total_tva, total_ttc, total_localtax1, total_localtax2, situation_percent, fk_prev_id, fk_unit, fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc) VALUES (31, null, ‘Test PayPal PMT’, ‘Test PayPal PMT’, 1, 0, 0, 0, ‘0’, ‘0’, 1, 1, 0, 0.99, null, null, null, 0, 0, 0, null, 0, ‘0’, 0.99, 0, 0.99, 0, 0, 100, null, NULL, 0, ‘USD’, 0.99, 0.99, 0, 0.99)
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=LINEBILL_INSERT Triggers for file ‘interface_20_modWorkflow_WorkflowManager.class.php’ need module to be enabled
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=LINEBILL_INSERT Triggers for file ‘interface_50_modAgenda_ActionsAuto.class.php’ need module to be enabled
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=LINEBILL_INSERT Triggers for file ‘interface_50_modLdap_Ldapsynchro.class.php’ need module to be enabled
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=LINEBILL_INSERT Triggers for file ‘interface_50_modMailmanspip_Mailmanspipsynchro.class.php’ need module to be enabled
2016-09-28 12:50:11 INFO ???@root Interfaces::run_triggers action=LINEBILL_INSERT Launch runTrigger for file ‘interface_20_all_Logevents.class.php’
2016-09-28 12:50:11 INFO ???@root Interfaces::run_triggers action=LINEBILL_INSERT Launch runTrigger for file ‘interface_20_modPaypal_PaypalWorkflow.class.php’
2016-09-28 12:50:11 INFO ???@root Interfaces::run_triggers action=LINEBILL_INSERT Launch runTrigger for file ‘interface_50_modNotification_Notification.class.php’
2016-09-28 12:50:11 INFO ???@root Trigger ‘Notification’ for action ‘LINEBILL_INSERT’ launched by /usr/share/dolibarr/htdocs/core/triggers/interface_50_modNotification_Notification.class.php. id=25
2016-09-28 12:50:11 INFO ???@root Notify::send notifcode=LINEBILL_INSERT, object=25
2016-09-28 12:50:11 DEBUG ???@root Facture::update_price
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid, qty, subprice as up, remise_percent, total_ht, total_tva as total_tva, total_ttc, total_localtax1 as total_localtax1, total_localtax2 as total_localtax2, tva_tx as vatrate, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, info_bits, product_type, situation_percent, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc FROM llx_facturedet WHERE fk_facture = 31 AND product_type <> 9 ORDER by rowid
2016-09-28 12:50:11 INFO ???@root Price.lib::calcul_price_total qty=1 pu=0.99000000 remise_percent_ligne=0 txtva=0.000 uselocaltax1_rate=0 uselocaltax2_rate=0 remise_percent_global=0 price_base_type=HT type=1 progress=100
2016-09-28 12:50:11 INFO ???@root Price.lib::calcul_price_total MAIN_ROUNDING_RULE_TOT= pu=0.99000000 qty=1 price_base_type=HT total_ht=0.99-total_vat=0-total_ttc=0.99
2016-09-28 12:50:11 DEBUG ???@root Facture::update_price
2016-09-28 12:50:11 DEBUG ???@root sql=UPDATE llx_facture SET total=‘0.99’, tva=‘0’, localtax1=‘0’, localtax2=‘0’, total_ttc=‘0.99’, multicurrency_total_ht=‘0.99’, multicurrency_total_tva=‘0’, multicurrency_total_ttc=‘0.99’ WHERE rowid = 31
2016-09-28 12:50:11 DEBUG ???@root Facture::update_price
2016-09-28 12:50:11 DEBUG ???@root sql=SELECT rowid, qty, subprice as up, remise_percent, total_ht, total_tva as total_tva, total_ttc, total_localtax1 as total_localtax1, total_localtax2 as total_localtax2, tva_tx as vatrate, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, info_bits, product_type, situation_percent, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc FROM llx_facturedet WHERE fk_facture = 31 AND product_type <> 9 ORDER by rowid
2016-09-28 12:50:11 DEBUG ???@root Facture::update_price
2016-09-28 12:50:11 DEBUG ???@root sql=UPDATE llx_facture SET total=‘0.99’, tva=‘0’, localtax1=‘0’, localtax2=‘0’, total_ttc=‘0.99’, multicurrency_total_ht=‘0.99’, multicurrency_total_tva=‘0’, multicurrency_total_ttc=‘0.99’ WHERE rowid = 31
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=BILL_CREATE Triggers for file ‘interface_20_modWorkflow_WorkflowManager.class.php’ need module to be enabled
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=BILL_CREATE Triggers for file ‘interface_50_modAgenda_ActionsAuto.class.php’ need module to be enabled
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=BILL_CREATE Triggers for file ‘interface_50_modLdap_Ldapsynchro.class.php’ need module to be enabled
2016-09-28 12:50:11 DEBUG ???@root Interfaces::run_triggers action=BILL_CREATE Triggers for file ‘interface_50_modMailmanspip_Mailmanspipsynchro.class.php’ need module to be enabled
2016-09-28 12:50:11 INFO ???@root Interfaces::run_triggers action=BILL_CREATE Launch runTrigger for file ‘interface_20_all_Logevents.class.php’
2016-09-28 12:50:11 INFO ???@root Interfaces::run_triggers action=BILL_CREATE Launch runTrigger for file ‘interface_20_modPaypal_PaypalWorkflow.class.php’
2016-09-28 12:50:11 INFO ???@root Interfaces::run_triggers action=BILL_CREATE Launch runTrigger for file ‘interface_50_modNotification_Notification.class.php’
2016-09-28 12:50:11 INFO ???@root Trigger ‘Notification’ for action ‘BILL_CREATE’ launched by /usr/share/dolibarr/htdocs/core/triggers/interface_50_modNotification_Notification.class.php. id=31
2016-09-28 12:50:11 INFO ???@root Notify::send notifcode=BILL_CREATE, object=31
2016-09-28 12:50:11 INFO ???@root Facture::validate user=1, force_number=, idwarehouse=0
2016-09-28 12:50:11 ERR ???@root Facture::validate Permission denied MAIN_USE_ADVANCED_PERMS=
2016-09-28 12:50:12 DEBUG ???@root ROLLBACK Transaction
2016-09-28 12:50:12 ERR ???@root Cronjob::run_jobs END result=1 error=Permission denied
2016-09-28 12:50:12 DEBUG ???@root BEGIN Transaction
2016-09-28 12:50:12 DEBUG ???@root Cronjob::update
2016-09-28 12:50:12 DEBUG ???@root sql=UPDATE llx_cronjob SET label=‘RecurringInvoices’, jobtype=‘method’, command=’’, classesname=‘compta/facture/class/facture-rec.class.php’, objectname=‘FactureRec’, methodename=‘createRecurringInvoices’, params=’’, md5params=’’, module_name=‘facture’, priority=0, datelastrun=‘20160928125011’, datenextrun=‘20160928121700’, dateend=null, datestart=‘20160928103600’, datelastresult=‘20160928125012’, lastresult=‘1’, lastoutput=‘Found 1 recurring template invoice(s) qualified for generation.\nPermission denied’, unitfrequency=86400, frequency=1, status=1, fk_user_mod=1, note=‘Generate recurring invoices’, nbrun=31, maxrun=null, libname=null, test=’’ WHERE rowid=1
2016-09-28 12:50:12 DEBUG ???@root COMMIT Transaction
2016-09-28 12:50:12 ERR ???@root cron_run_jobs.php:: run_jobs ErrorPermission denied

I can execute the job manual from the webpage but when I launch the script manually or by cron it gives me this error.

Any help would be greatly appreciated

Can you paste the command into your cron ?

The command I run the manual cron job is
root@pcname:~# /usr/share/dolibarr/scripts/cron/cron_run_jobs.php 7d3fb57de57b2fdb52df1561c4a80df7 pasquinic 1

The Cron job I inserted into crontab is as follows
*/5 * * * * /usr/share/dolibarr/scripts/cron/cron_run_jobs.php 7d3fb57de57b2fdb52df1561c4a80df7 pasquinic > /usr/share/dolibarr/documents/cron_run_jobs.php.log

I did notice that the permissions error are only when a reoccurring bill is set to Validate in the Template Invoice “Status of generated invoices
Validated (needs to be paid)” If I set it to Draft the error doesn’t occur.

1 Like

Any updates? This is becoming a really big issue. I like the product but if it’s not going to work I might just have to go an alternative route


Update
 So Even after a fresh installation and new database ver. 4.0.1 still has issues. I did notice that the dolibarr.log is calling for MAIN_USE_ADVANCED_PERMS= and so I placed that in Setup|Other Setup and set the variable to 1 as per some documentation I found online. Still no good. I am using the main admin account. I don’t understand why it will create a “Draft” invoice awaiting validation but it won’t automatically validate
 Can anyone help me? I am willing to pay for commercial support. I need this feature to work.

I used to have the same issue and have to setup my crons jobs in this site using the URL concatenating userlogin and securitykey and works like charm https://www.easycron.com/ give a try and post results
 :happy:

It’s because the rights of user aren’t loaded.
You can delete MAIN_USE_ADVANCED_PERMS and add this line in "/scripts/cron/cron_run_job.php at line (116):
$user->getrights();

For anyone else who stumbled on this thread first while researching setting up a cron.

I don’t know what version they added it, but at least as of version 10.0.1 there is a module for setting up cron jobs. You can also go directly to the scheduled jobs by going to:
whateveryourdomainis.com/cron/list.php

I hope this saves someone some time researching best practices for setting up a cron within Dolibarr.