chmod 777chmod 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,Start by setting permission numbers to 777 to grant files more access, then use the chmod command to modify specific permissions for each folder in var.