Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Permisssion denied in cronjob executing?

Discussion in 'General Discussion' started by phpmady23, May 1, 2011.

  1. phpmady23

    phpmady23 Registered

    Joined:
    May 1, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    I am using cpanel, where i am want to run a php file, to delete the old records,

    i used cronjob in cpanel to do this.

    In time columns i have made : * * * * * to execute each and every minute the script..

    In the command textbox i have made: /home/server25/public_html/auto_cancel.php


    in the email box: admin_email@gmail.com


    I am getting Permission denied to my email address:
    The error report am getting is :

    /bin/sh: /home/server25/public_html/auto_cancel.php: Permission denied

    Please help me to solve this.
    Thanks,
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,724
    Likes Received:
    74
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    php -q /home/server25/public_html/auto_cancel.php
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I am uncertain if it is advisable to set a cron job to run every minute to perform a deletion operation. Most hosting providers would not want such a cron running every minute on a machine. Once you get the cron working, I would suggest changing it to every 5 minutes or every 15 minutes instead to ensure that this does not have an adverse impact on the machine.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice