There are three major types of file permissions:
User permissions. These permissions apply to a single user who has special access to a file.
This user is called the owner.
Group permissions. These apply to a single group of users who have access to a file.
This group is the owning group.
Other permissions. These apply to every other user on the system.
These users are known as others.
When a file is created, its owne
r is the user who created it, and the owning group is the user's current group.
4 STANDS FOR "READ"
2 STANDS FOR "WRITE"
1 STANDS FOR "EXECUTE"
0 STANDS FOR "NO PERMISSION'
7 would give "READ", "WRITE" and "EXECUTE" permissions.
6 would give "READ" and "WRITE" permissions.
5 would give "READ" and "EXECUTE" permissions.
4 would give "READ" only permissions.
Only root can change the owner of a file.
The owner cannot transfer ownership, unless the owner is root, or uses sudo to run the command.