subbing/24
Subbing › Guides › Linux permissions

Linux permissions quiz

chmod, octal, umask. Relevant for Linux+, RHCSA, Security+.

File permissions are three digits that everyone half-knows. Subbing makes them automatic: octal to symbolic and back, what a new file gets under a given umask, what chmod g+w does to a mode, which special bit a leading 4, 2 or 1 sets, and whether a given user can read, write or execute a file.

Start drilling linux permissionsGet the Android app
Five sample questions, with the working

Generated by the same code as the app. They change with every release; the app never runs out.

chmod 600 gives which permissions?
Answer: rw-------
  1. owner 6 = rw-, group 0 = ---, others 0 = ---
  2. rw-------
Permissions ----w---x in octal?
Answer: 021
  1. owner --- = 0, group -w- = 2 = 2, others --x = 1 = 1
  2. 021
Question types in this topic
Guide

Linux file permissions: Read and write Linux permission modes: the three digits, rwx triplets, umask arithmetic, symbolic chmod, setuid, setgid and the sticky bit.

Questions people ask

What does chmod 755 give?

rwxr-xr-x. The owner gets read, write and execute (4+2+1), the group and others get read and execute (4+1).

What does umask 022 do?

It removes write permission for group and others from the default. New files start at 666 and become 644; new directories start at 777 and become 755.

What is the sticky bit?

Shown as a t in the others execute slot (for example rwxrwxrwt on /tmp). In a directory it means only a file's owner can delete or rename it, even though everyone can write to the directory.

Start drilling linux permissionsGet the Android app
Other topics
Subnetting practiceMasks, ranges and hostsIPv6 practiceNotation, types, EUI-64Port numbers quizWell-known ports, TCP vs UDP