Fixing user permissions when error -69841 won't let me
I want to repair user permissions on a Mac that's running slower than it should. In the past, I've followed the advice that's all over the web (including https://apple.stackexchange.com/questions/354432/the-command-line-would-not-let-me-repair-my-disk-permission-on-mac-mojave) which is basically:
(a) Get info on the home folder, ensure it's correct for that user (read/write for the user and read-only for staff and everyone) then apply to all enclosed folders.
(b) In Terminal type:
diskutil resetUserPermissions / `id -u`
(c) If Terminal says that permissions reset on user home directory failed (error -69841): enter:
chflags -R nouchg ~ and then reissue the
diskutil resetUserPermissions / `id -u`
.. command. Usually, that works, but occasionally the error -69841 returns.
So what could I do to get rid of the -69841 error and fix user permissions?