Modify File Permissions

Make File

touch file.txt

View File Permissions

ls -al file.txt
-rw-r--r--  1 chris chris    0 Jul 18 16:59 file.txt

Add Execute Permission To User

chmod u+x file.txt

Add Write Permission To Group

chmod g+w file.txt

Remove Read Permission From World

Note: “World” in this case means every user who isn’t file’s owner or in the file’s owner usergroup.

chmod o-r file.txt

View File Permissions

ls -al file.txt
-rwxrw---- 1 chris chris 0 Jul 18 16:59 file.txt