cron permissions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trehahn
    Junior Member
    • Mar 2006
    • 17

    cron permissions

    I've got a file I need to execute using a cron, however I"m getting permissions denied. I've tried for awhile and just can't seem to figure out the permissions that will work. Permissions have confused me before though LOL

    Here is what it says:

    /path_to_file/cronzweather mosConfig_absolute_path

    Change the "mosConfig_absolute_path" to the absolute path defined in your Joomla global settings, like "/home/account/public_html/site_a/" . The "path_to_file" should probably be outside of your public_html directory since it is not directly called from the web site.

    I had the locations setup right, but the permissions aren't. The cache folder needs to be writeable, as this file that runs will refresh them with new data at whatever interval is chosen.

    My question is this, what permissions does the cron folder and file need, and what permissions does the cache folder and files in the folder need?

    Thanks!
    Tim Rehahn
    Tru3 Style Radio
    The Best Music From One End Of The World To The Other
  • AndrewT
    Administrator
    • Mar 2004
    • 3653

    #2
    What kind of file are you trying to execute?

    Comment

    • trehahn
      Junior Member
      • Mar 2006
      • 17

      #3
      It's a PHP file that just refreshes the cache files. It's a component addon for Joomla, called Zweather. The cron will run at a given interval, and will write the updated weather to the proper cache file, so when the website is loaded it has the current weather. I'm just not sure what permissions need to be set. I've tried everything I thought was correct, and it still says permission denied. Thanks.
      Tim Rehahn
      Tru3 Style Radio
      The Best Music From One End Of The World To The Other

      Comment

      • AndrewT
        Administrator
        • Mar 2004
        • 3653

        #4
        You just need 644 on the PHP file. Then for cron use:

        /usr/local/bin/php /home/*username*/public_html/path/to/file.php

        or to run it using PHP 5 use:

        /usr/local/bin/php5 /home/*username*/public_html/path/to/file.php

        Comment

        • trehahn
          Junior Member
          • Mar 2006
          • 17

          #5
          It's still saying permission denied. I think it wants the absolute path to the file. Which wouldn't be /home/username/ there would be folders before home. Not sure.

          /path_to_file/cronzweather mosConfig_absolute_path

          Thats what it wants. The 2nd half it says is in the Joomla config, I got that. The first part the path to the file is what confuses me. I know what the path is on my end, but not the absolute path. I'm more confused now than before LOL
          Tim Rehahn
          Tru3 Style Radio
          The Best Music From One End Of The World To The Other

          Comment

          • AndrewT
            Administrator
            • Mar 2004
            • 3653

            #6
            There aren't folders before /home, what I gave you would be the absolute path. Please submit a trouble ticket regarding this and I can take a look it specifically. Simply provide the exact cron entry that you are using.

            Edit: Nevermind, I see you already submitted a ticket.
            Last edited by AndrewT; 08-06-2007, 09:29 AM.

            Comment

            Working...