Hardening Ownerless Files

You can run the find / -nouser -nogroup command to search for ownerless files in a container or on a physical machine. Then, create users and user groups based on the UIDs and GIDs of the files, or change the UIDs of existing users or GIDs of user groups to assign file owners, to prevent security risks caused by ownerless files.