MikeJones yes, well, it depends. If you run ls -lah vendor/flarum/core/src/Database
we can see better. The point is that your web server user should have write permission to files in that directory (it's also stated in ReCache's readme). The problem could be either that the permissions are wrong, and your command would fix that (for one file at least), or the owner/group is wrong.
From the output above we can understand which of the two is the issue.