Manage file ownership

In Linux, each file has an owner and a group with which it’s associated. The file’s owner can change the file’s group, but only to a group to which the user belongs. root can change both the owner and group of any file.

You can use the ls -l command to display the owner and group:

linux display file ownership

The first underlined field represents the owner of the file (bob) and the second underlined field represents the group name of the file (bob).

The ownership concept also applies to running programs. Most programs you run are tied to the account you’ve used to launch them. This identity, in conjunction with the file’s ownership and permissions, determines whether a program may or may not modify a file.

linux process ownership

In the picture above you can see that bob is the owner of the program xeyes.

Geek University 2022