Answers.Body: <p>The version check job tries to write a file in the upload directory, typically <code>wp-content/uploads/civicrm/upload</code>   Check the file permissions to make sure those files and directories are writable by the OS user that runs the webserver  (might be <code>www-data</code> or <code>http</code> etc)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-11T13:40:32.523Z
Answers.Text: The specific file is called version-msgs-cache.json:
  https://github.com/civicrm/civicrm-core/blob/532dda195dddcbdc81898d8ba8de2d96d88d6998/CRM/Utils/VersionCheck.php#L19
Answers.UserDisplayName: Lars SG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-11T13:37:53.957Z
Answers.LastActivityDate: 2023-07-11T13:37:53.957Z
Answers.UserDisplayName: Aidan
Body: <p>CiviCRM 5.62.1 / Wordpress 6.2.2</p>
  <p>I have an intermittent error on the version check action as part of my cron. It'll run fine for a couple of days, then fail, then run again. I suspect an over enthusiastic Wordfence plug-in. I think the issue started around the same time Wordfence left 'training' mode, but I don't know which file to tell Wordfence to ignore.</p>
  <p>The other actions on my cron seem to be fine, so I think it's just this one file relating to the version status that's affected.</p>
  <p>Any suggestions?</p>
  <p>2023-07-09 09:05:03 CiviCRM Update Check<br />
  Entity: job Action: version_check
  Summary
  Finished execution of CiviCRM Update Check with result: Success (1)</p>
  <p>2023-07-08 09:05:03 CiviCRM Update Check<br />
  Entity: job Action: version_check
  Summary
  Finished execution of CiviCRM Update Check with result: Failure, Error message: File not writable</p>
  
Tags: <cron-job><scheduled-job><filesystem><version>
Title: intermittent file not writable error
ThreadText: # intermittent file not writable error
  
  (Asked by: username_0 on 2023-07-11)
  
  CiviCRM 5.62.1 / Wordpress 6.2.2
  
  I have an intermittent error on the version check action as part of my cron. It'll run fine for a couple of days, then fail, then run again. I suspect an over enthusiastic Wordfence plug-in. I think the issue started around the same time Wordfence left 'training' mode, but I don't know which file to tell Wordfence to ignore.
  
  The other actions on my cron seem to be fine, so I think it's just this one file relating to the version status that's affected.
  
  Any suggestions?
  
  2023-07-09 09:05:03 CiviCRM Update Check  
  Entity: job Action: version\_check
  Summary
  Finished execution of CiviCRM Update Check with result: Success (1)
  
  2023-07-08 09:05:03 CiviCRM Update Check  
  Entity: job Action: version\_check
  Summary
  Finished execution of CiviCRM Update Check with result: Failure, Error message: File not writable
  
  **Tags:** cron-job, scheduled-job, filesystem, version
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-07-11. Score: 1 | Accepted answer
  
  The version check job tries to write a file in the upload directory, typically `wp-content/uploads/civicrm/upload` Check the file permissions to make sure those files and directories are writable by the OS user that runs the webserver (might be `www-data` or `http` etc)
  
  > **Comments:**
  > **username_2**: The specific file is called version-msgs-cache.json: https://github.com/civicrm/civicrm-core/blob/532dda195dddcbdc81898d8ba8de2d96d88d6998/CRM/Utils/VersionCheck.php#L19  
  
  ---
  
  