Linux chmod parameters explained

How to use chmod in Linux.

chmod u+ = assign user permissions

chmod g+ = assign group permissions

chmod a+ = assign all permissions

Some examples:

Command:

chmod u+wrx testfile.txt

Result:

-rwx------  1 root root 0 Feb  5 16:53 testfile.txt

Command:

chmod g+wrx testfile.txt

Result:

----rwx---  1 root root 0 Feb  5 16:53 testfile.txt

Command:

chmod a+wrx testfile.txt

Result:

-rwxrwxrwx  1 root root 0 Feb  5 16:53 testfile.txt

admin has written 102 articles