===================== = THE CHMOD COMMAND = ===================== First here are few things you need to know: ----------------------------------------------- - File Ownerships (u)ser , (g)roup , (o)thers - File Permissions (r)ead , (w)rite , e(x)ecute - View Permissions with ls command EXAMPLE: ls -l [PRESS ENTER] -rwxr-xr-- 2 iclunk nobody 512 Dec 8 12:40 sdf-noob.txt -rw------- 2 iclunk nobody 512 Jun 12 12:34 newfile.txt - Permissions Breakdown (u)ser (g)roup (o)thers -rw- xr- xr- 2 iclunk nobody 512 Dec 8 12:40 sdf-noob.txt 1)First section is permissions for user 2)Second section is for group 3)Third section is for others -NOTE: The d at the beginning of the line stands for directory. drwxr-xr-- 2 iclunk nobody 512 Dec 8 12:40 articles drwxr-xr-- 2 iclunk nobody 512 Jul 14 18:31 bin drwxr-xr-- 2 iclunk nobody 512 Dec 8 12:52 books Examples of CHMOD command: ----------------------------------------------- $chmod g+w sdf-noob.txt [PRESS ENTER] $ls -l [PRESS ENTER] -rw------- 2 iclunk nobody 512 Jun 12 12:34 newfile.txt -rwxrwxr-- 2 iclunk nobody 512 Dec 8 12:40 sdf-noob.txt [Gives the group (w)rite permission to the sdf-noob.txt file] $chmod u+x,g+rx,o+r newfile.txt $ls -l [PRESS ENTER] -rwxr-xr-- 2 iclunk nobody 512 Jun 12 12:34 newfile.txt [The above is a good example for gopher file permissions] $chmod u-wx articles [PRESS ENTER] $ls -l {PRESS ENTER] dr--r-xr-- 2 iclunk nobody 512 Dec 8 12:40 articles drwxr-xr-- 2 iclunk nobody 512 Jul 14 18:31 bin drwxr-xr-- 2 iclunk nobody 512 Dec 8 12:52 books [Removes the (w)rite and e(x)ecute permissions from the articles directory] CHMOD in absolute mode: ----------------------------------------------- -You can use numbers with the CHMOD Command $chmod 754 file.txt [The above example is perfect for your gopher hole files] $chmod 700 filename.json [The above example only the owner to read, write, and execute] $chmod 777 filename [The above example gives everbody all permissions...can be dangerous] $chmod -R 755 directory [The above command gives all files and subdirectories in directory same permissions. In this case the only the owner can write but everyone can read and execute] --------------------------------- Another great document by iclunk(Kdawg). References: https://www.freecodecamp.org/news/linux-chmod-chown-change-file-permissions/ https://linuxhandbook.com/chmod-command/