Every file or directory created on a Linux system belongs to a user and a group, which are also known as the owner of the file or the group owner of the file. Ownership of the file or the directory can be modified by the root user, or the owner of the file. Group ownership again can only be modified by the root user or the owner of the file, for the groups only to which he is a member. This section covers how to manage the ownership of files and directories.
Managing file ownership
Understanding default ownership
When we create a file or directory, it gets certain default ownership and group ownership. The user who creates the file becomes the user (owner) of that file, and the primary group of that user becomes the group...