XF 2.3 XF 2.3.3 File clean up job failed for XF due to write permissions. Legacy files may need to be cleaned up manually

Andy.N

Well-known member
Upgraded from 2.3.2 to 2.3.3 from the command line and has this error show up in ACP.
Then upgraded the XFRM, XFES, XFMG addons from the ACP.

Server error log
  • ErrorException: File clean up job failed for XF due to write permissions. Legacy files may need to be cleaned up manually.
  • src/XF/Error.php:82
  • Generated by: Unknown account
  • 9/3/24 at 9:51 AM

Stack trace​

#0 src/XF.php(266): XF\Error->logError(Object(XF\Phrase), false)
#1 src/XF/Job/FileCleanUp.php(115): XF::logError(Object(XF\Phrase))
#2 src/XF/Job/FileCleanUp.php(52): XF\Job\FileCleanUp->stepDeleteFiles(5.03192)
#3 src/XF/Job/Manager.php(275): XF\Job\FileCleanUp->run(5.03192)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 5.03192)
#5 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 5.03192)
#6 job.php(46): XF\Job\Manager->runQueue(false, 8)
#7 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(78) "https://domain.com/admin.php?add-ons/install-from-archive-complete&batch_id=284"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Related note... I decided to run the CLI command after updating to 2.3.3. And I got this.

Code:
php cmd.php xf:file-clean-up XF --dry-run


 [INFO] Found 2,927 files to be deleted:

this does not seem right 🤔 List of files

should i run this command without dry run?
 
when you run from the command line, the files you upload tend to take the permission of you as the logged in user, perhaps root. The owner of the files needs to be nginx for example.

@Chromaniac , that list looks a bit suspicious. i'd hold off until you hear back.
 
You can check the list of files to be cleaned up against a copy of the software downloaded from your account.

If they are not included in the 2.3.3 archive then the list is correct.

I checked the first several and none of them were present.
 
Took multiple backups just in case lol.

Code:
 Are you sure you want to clean up 2,927 files for XF? (yes/no) [yes]:
 > yes

Deleting legacy files…
----------------------

    0/2927 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0% < 1 sec/< 1 sec

 [OK] File clean up has been completed.

This was kind of confusing because I have run this command on the previous release and it did not really delete anything so was just worried. Site does seem to run fine atm.
 
Back
Top Bottom