Answers.Body: <p>Two answers:  First, yes, changing the permission should be safe to do.  Note, however, that you'll have to repeat this process every time you upgrade.</p>
  
  <p>Second - this isn't a normal restriction, so I'm guessing you're running CiviCRM on shared hosting.  The change you described removed the "group owner can write to this file" permission of <code>cron.php</code>.  You did NOT change who could read or execute the file - so this shouldn't have had an effect.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-17T15:01:06.163Z
Answers.Text: If shared hosting is working for you in all other respects, then this is probably a non-issue.  However, it is exactly this sort of issue that causes me to recommend not using shared hosting - you have to spend time handling the quirks of whomever runs the server, and it's different for every host.  An hour of my time spent troubleshooting an issue like this for someone could pay for a year of a VPS!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-17T15:00:53.867Z
Answers.LastActivityDate: 2017-08-17T15:00:53.867Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm attempting to run all my jobs using the <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs#ManagingScheduledJobs-URLmethod" rel="nofollow noreferrer">URL Method</a>. The URL I'm trying (anonymized here of course) is:</p>
  
  <p><code>https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=MY_USERNAME&amp;pass=MY_PASS&amp;key=MY_SITE_KEY</code></p>
  
  <p>Visiting this URL gives me a 404 error.</p>
  
  <p>To test that cron runs at all on my server, I created a simple <code>php</code> script,</p>
  
  <pre><code>&lt;?php
  mail ("cron@mysite.org", "Cron is Go", "Hello World from my-cron.php!");
  ?&gt;
  </code></pre>
  
  <p>and put it in a file <code>my-cron.php</code>. It sends me an email when visited. I then created a cron job to <code>curl</code> its url every minute. It worked in every directory I moved it too until it got to <code>bin</code> at which point the cron job did nothing and visiting the URL in browser gave me a 404 error.</p>
  
  <p>Changing the permissions on <code>bin</code> from <code>0775</code> to <code>0755</code> allows the script to run. I thought that the jobs URL would work, but I still get a 404 error.</p>
  
  <p><strong>Update</strong>: I changed <code>bin</code> from <code>0775</code> to <code>0755</code> and <code>cron.php</code> to <code>0755</code>, and it works now. Is this safe to do?</p>
  
Tags: <wordpress><cron>
Title: URL for cron Jobs gives me a 404 error
ThreadText: # URL for cron Jobs gives me a 404 error
  
  (Asked by: username_0 on 2017-08-16)
  
  I'm attempting to run all my jobs using the URL Method. The URL I'm trying (anonymized here of course) is:
  https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=MY_USERNAME&pass=MY_PASS&key=MY_SITE_KEY
  Visiting this URL gives me a 404 error.
  To test that cron runs at all on my server, I created a simple php script,
  
  
  and put it in a file my-cron.php. It sends me an email when visited. I then created a cron job to curl its url every minute. It worked in every directory I moved it too until it got to bin at which point the cron job did nothing and visiting the URL in browser gave me a 404 error.
  Changing the permissions on bin from 0775 to 0755 allows the script to run. I thought that the jobs URL would work, but I still get a 404 error.
  Update: I changed bin from 0775 to 0755 and cron.php to 0755, and it works now. Is this safe to do?
  
  **Tags:** wordpress, cron
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-08-17. Score: 2 | Accepted answer
  
  Two answers: First, yes, changing the permission should be safe to do. Note, however, that you'll have to repeat this process every time you upgrade.
  
  Second - this isn't a normal restriction, so I'm guessing you're running CiviCRM on shared hosting. The change you described removed the "group owner can write to this file" permission of `cron.php`. You did NOT change who could read or execute the file - so this shouldn't have had an effect.
  
  > **Comments:**
  > **username_1**: If shared hosting is working for you in all other respects, then this is probably a non-issue.  However, it is exactly this sort of issue that causes me to recommend not using shared hosting - you have to spend time handling the quirks of whomever runs the server, and it's different for every host.  An hour of my time spent troubleshooting an issue like this for someone could pay for a year of a VPS!  
  
  ---
  
  