Cron permission denied
  • Hi:

    Something is wrong with my crons.. I'm receiving thousands of email notifications that contains these lines like these every minute:


    /bin/sh: /home/user/public_html/newscoop/bin/newscoop-autopublish: Permission denied

    /bin/sh: /home/user/public_html/newscoop/bin/newscoop-autopublish: Permission denied

    /bin/sh: /home/user/public_html/newscoop/bin/newscoop-indexer: Permission denied

    Any clue?

    Thanks!




  • 8 Comments sorted by
  • now I'm getting email notifications with warnings like this:

    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />

  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    Oscar wrote on Sun, 13 February 2011 01:16
    Hi:

    Something is wrong with my crons.. I'm receiving thousands of email notifications that contains these lines like these every minute:


    /bin/sh: /home/user/public_html/newscoop/bin/newscoop-autopublish: Permission denied

    /bin/sh: /home/user/public_html/newscoop/bin/newscoop-autopublish: Permission denied

    /bin/sh: /home/user/public_html/newscoop/bin/newscoop-indexer: Permission denied

    You've changed somehow the file rights. You need to restore via chown command. For example
    sudo chown -R user:user /home/user/public_html/newscoop


  • Hi:

    I executed the command within /home/user/public_html/newscoop:

    chown -R user:user *

    but keep getting cron related email warnings like this:


    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Ca mpSession.php </b> on line <b>81</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Ca mpSession.php </b> on line <b>81</b><br />
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    hi Oscar,

    could you run the cron tasks (bin/newscoop-autopublush, newscoop-indexer, newscoop-statistics) manually and check for these warnings. I can not reproduce it on my instances. Thanks.
  • Andrey Podshivalov wrote on Tue, 15 February 2011 11:04
    hi Oscar,

    could you run the cron tasks (bin/newscoop-autopublush, newscoop-indexer, newscoop-statistics) manually and check for these warnings. I can not reproduce it on my instances. Thanks.


    Hi:


    I got errors for all of the cron jobs except for the last one which is the following.

    php -q /home/user/public_html/newscoop/bin/newscoop-statistics

    Here is every other cron job ran from the command line.

    root@server1:~# php -q /home/user/public_html/newscoop/bin/newscoop-autopublish [02/15/11 12:13pm]
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    root@server1:~# php -q /home/user/public_html/newscoop/bin/newscoop-indexer --silent [02/15/11 12:13pm]
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    root@server1:~# php -q /home/user/public_html/newscoop/bin/subscription-notifier [02/15/11 12:14pm]
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    root@server1:~# php -q /home/user/public_html/newscoop/bin/events-notifier [02/15/11 12:14pm]
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in <b> /home/user/public_html/newscoop/template_engine/classes/Camp Session.php </b> on line <b>81</b><br />


  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    I've tried but can not reproduce. To avoid these warnings you can set up output buffer in /etc/php5/cli/php.ini: output_buffering = 4096

    but for me it works w/o buffering.
  • Hi:

    I noticed that these errors started to occur when I installed a fresh newscoop instance in the same dir where a Campsite install was.

    I renamed the old dir and created a dir with same name and installed Newscoop. And from that date I'm receiving the errors by mail.

    new install is on a new db.

    Any clue?
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    Created a ticket for this:
    http://dev.sourcefabric.org/browse/CS-2795

    Please follow up there.


    Paul Baranowski
    CTO, Sourcefabric, http://sourcefabric.org

    +1 (416) 832-6436 (Cell)
    Skype: paulbaranowski
    720 Bathurst St. / Suite 203 / Toronto / ON / M5S 2R4 / Canada



    On Tue, Feb 15, 2011 at 8:29 PM, Oscar <
    newscoop-support@lists.sourcefabric.org> wrote:

    > Hi:
    >
    > I noticed that these errors started to occur when I installed a fresh
    > newscoop instance in the same dir where a Campsite install was.
    >
    > I renamed the old dir and created a dir with same name and installed
    > Newscoop. And from that date I'm receiving the errors by mail.
    >
    > new install is on a new db.
    >
    > Any clue?
    >