| « Installing Nvidia drivers on Fedora | HOWTO: Work with Services, auto start, stop, start » |
Changing ownership of files when the UID/GID is obsolete or you need to change it for some other reason.
If you have changed or removed a UID for a user or GID a group, you must also change the flags set on the files belonging to these IDs. Otherwise you will have orphaned files.
Use find to locate and change the ownership of files. This command-line finds all files on the system owned by user UID and changes ownership to user newuser:
This variation changes the group ownership:
NOTE: These examples assume a search of the entire system (including all mounted filesystems whether local or imported). To restrict the search to a single filesystem, use a top level path name instead of / (root). You may also want to skip mounted filesystems by including the -mount option.