Help with changing user home folder file name
Don't try to swap the short name out. Do make a back up before you attempt any user folder rename. Consider restoring a file or two from the backup if you've never done that.

Instead, make a new user that's a temporary admin.


Use that user to delete the old account, keep the home directory.
Then rename the old /Users/whatever folder to be what you want for the short name.
Then make a new user account with that exact same short name.


You'll have the correct permissions and user at that point and can delete the temporary admin or keep it around if you don't mind.