chmod 777Yes, it is dangerous to set chmod 777 permissions. You should only use chmod 755 for directories and chmod 644 for files. You should onlyStart 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.