This is normal. sudo less ... runs `less` as root, but without changing the home directory. Running searches causes the search history to be updated in `~/.lesshst`, which changes the ownership of the file to the current user, root. If you want to avoid this, you can tell `less` to temporarily not store its search history: sudo LESSHISTFILE=- less ... This does however mean that you won’t be able to use the stored search history (<kbd>/</kbd> followed by <kbd>↑</kbd>, or even <kbd>n</kbd> without specifying a search string). Another option is to tell `less` to use root’s history, by telling `sudo` to set the `HOME` variable to point to root’s home directory: sudo -H less ...