--There are 3 user types.
u - user (file or directory owner, creator)
g - group (the group to which the file or directory belongs)
o - other (other than users, user and group)
a - all (ugo) (all, everyone can access files and directories.)
--(Chmod Permissions)
Chmod access permissions are always listed as rwx.
r - (Read permission)
w - (Write permission)
x - (Execute permission)
--Operators for Chmod permissions
- (remove chmod permission)
+ (add chmod permission)
= (set chmod permission)
--Some examples of chmod:
chmod + r security: we have given read (r) permission to security file.
chmod -x security: We have removed the run (x) permission in the security file.
chmod u = rw, go = security.html: We gave the file owner permission to read and write. We removed all access permissions for the group and others.
chmod + x filename: We have given the file permission to run for all users (user, group, other).
chmod 0 security.html: We removed all users' access permissions for the file.
chmod 666 security.pl: We have given read and write permission for all users.