File Manipulation
chmod a-w file (removes all writing permissions)
chmod o+x file (sets execute permissions for other (public permissions))
chmod u=rx file (Give the owner rx permissions, not w)
chmod go-rwx file (Deny rwx permission for group, others)
chmod g+w file (Give write permission to the group)
chmod a+x file1 file2 (Give execute permission to everybody)
chmod g+rx,o+x file (OK to combine like this with a comma)
u = user that owns the file
g = group that owns the file
o = other (everyone else)
a = all (everybody)
r = read access to the file
w = write access
x = execute (run) access
To manipulate files with chmod, you simply use the command chmod with the symbolic modifiers that you need. If you want to add permissions, you use call the section you want to add (user, goup, other) then add (+) then the permission to add (r,w,x). If changing multiple different levels, use a comma to separate the permission commands. ex: chmod a+x,o-r file.txt
If the group isn't specified on the command then the assumption is that the intent was for all. So chmod +x file.txt will apply the executable function for all groups to a file.
When using the numeric method there is no addition or subtraction, file permissions get newly assigned
r = read access to the file = 4
w = write access = 2
x = execute (run) access = 1
The first character in file permissions is a special character, if it is a dash (-) then that is a file, if it's a "d" then it's a directory