Unix file permissions and chmod explained in 5 minutes
In Unix-based systems, files and directories have access permissions.
If you open a terminal and run:
ls -l
You will get something like:

-
drwx------: file type and permissions.dindicates that it is a directory. The following nine characters represent the permissions for the file or directory. In this example,rwx------indicates that the owner of the directory (aristot) has read, write, and execute permissions, while others have no permissions. -
3: number of links to the file or directory. In this case, the directoryApplicationshas three links associated with it. -
aristot: owner of the file or directory. -
staff: group associated with the file or directory. -
96: file size in bytes. For directories, the size generally represents the amount of disk space used by the directory’s metadata. -
Feb 15 10:20: date and time of the last modification to the file or directory. -
Applications: name of the file or directory.
More about file permissions permissions:
d: directory. Files don’t have this.r: readw: writex: execute
The reason there are 9 characters apart from d, is that each file/directory has permissions on three levels:
user: file ownergroup: members of file’s groupothers: everyone else
Examples:
rwx------: file owner can read, write and execute the file, and everyone else can do nothing.r-xr-x--x: file owner and group can read and execute. Everyone else can only execute.
Each permission is associated with a number: r: 4, w: 2, x: 1. This results in a unique sum for each permission set:
rwx: 4+2+1 = 7rw-: 4+2 = 6r-x: 4+1 = 5-wx: 2+1 = 3
chmod is just a command-line tool that allows you to change permissions:
chmod 755 /some/filesets the permissions torwxfor owner andr-xfor group and others.chmod +x /some/fileadds execute permission to all.chmod -w /some/fileremoves write permission from all.
Links to this note
Read first I assume you are using Linux or Mac. You can probably easily modify this to work for Windows, or ask ChatGPT. Open your terminal and create a file...