Lesson plan: File Permissions
AP Cybersecurity · Unit 5 Securing Applications and Data · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · Practice set
At a glance
- Suggested time
- 3 class periods (45 min)
- Pacing
- Last of three sets for Topic 5.2. The CED gives Topic 5.2 seven class periods; this plan suggests 2 for Data States, Regulated Data, and Policies, 2 for Access Control Models and 3 for this set, with CED Scenario 5A on the third day. The CED does not divide the topic among sets; that split is this plan's. This set covers LO 5.2.D only.
- Before this set
- Access Control Models (subjects, objects, and least privilege). Authentication from Securing Devices, which Problem 1 🔒 sets against authorization. The Foundations lesson Web Applications, Databases, and Files shows where an application's files sit. No command-line experience is needed: every item prints its
ls -llisting. - Skills
- 2.A Identify security controls, and explain how they mitigate risks.2.D Implement and log mitigations with and without the support of AI.
The one idea: An ls -l permission string is three sets of rwx: the owner's, the group's, and everyone else's. Find the one set that applies to the account and read its three letters. To change it, chmod takes either three digits (4 read, 2 write, 1 execute, added up) or letters (u, g, o, a, then + or -, then r, w, x).
Day by day
Day 1 · Reading the permission string45 min
- Open (5 min)Write
rw-r--rw-on the board and ask what it might record. Collect guesses without correcting any. - Mini-lesson (15 min)Teach File Permissions, from the opening listing through the section "Reading the permission string" and its Authorization box. Stop at the question about players.csv (who can change the players' records?) and take answers before reading the paragraph that follows it. Leave "Changing permissions" and the rest for Day 2.
- Do together (10 min)Problem 6 🔒 Problem 1 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- On their own (12 min)Problem 2 🔒 Problem 4 🔒 Problem 8 🔒 Problem 11 🔒.
- Exit check (3 min)🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Day 2 · Showing and changing permissions45 min
- Open (5 min)Put yesterday's exit check string back up and ask how an administrator would give the owner write access. Collect ideas before the mini-lesson.
- Mini-lesson (15 min)Teach File Permissions, the sections "Changing permissions" and "The plus sign". Before showing the paragraph on
chmod 710 export_roster, read out its command and the digit rule (4 read, 2 write, 1 execute) and have students write the string they expect. The paragraph ends with the listing, so they can check their string against it. - Do together (10 min)Problem 9 🔒 Problem 13 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- On their own (12 min)Problem 3 🔒 Problem 5 🔒 Problem 7 🔒 Problem 12 🔒.
- Exit check (3 min)🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Day 3 · Settings that fit, and CED Scenario 5A45 min
- Open (5 min)Teach File Permissions, the last section, "A configuration change at Twitch". Point to its last sentence before the sources: the league's administrator listed the files again after the
chmodcommands. - Do together (10 min)Problem 14 🔒 Problem 10 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Groups (25 min)🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Wrap (5 min)Each student writes two sentences explaining what the setting on
/RandD/Formulagives the owner, the group, and all other users.
Differentiation
- If students are struggling
- Give a card with three columns, owner, group, and others, each split into r, w, and x, and have students copy the string into it before answering. Do Problem 8 🔒 and Problem 11 🔒 together, circling the set that applies to the account.
- Extension
- Students write a four-file
ls -llisting for a club or team, with a one-line requirement for each file and one setting that reaches too far. A partner finds it and writes the fix in both forms. - Vocabulary support
- authorization, authentication, owner, group, others, read, write, execute, numeric method, symbolic method,
ls -l,chmod,getfacl.
🔒 Answer keyEvery problem's answer, the concept and essential knowledge it checks, and the trap it targets.Sign in as a teacher to see this🔒 Traps this set testsWhat each common wrong answer looks like, and one line to say when you see it.Sign in as a teacher to see this🔒 What to emphasizeThe points that decide the set's problems.Sign in as a teacher to see this🔒 Questions to ask aloudQuestions for the class discussion, with what to listen for.Sign in as a teacher to see this🔒 On the examHow the set's ideas appear on the AP exam, from the course framework.Sign in as a teacher to see this🔒 Your class so farLive results for your section: the problems a third or more missed on the first try, the most common wrong answer, and what it usually means.Sign in as a teacher to see this
From the course framework
LO 5.2.D Configure access control settings on a Linux-based system.
- 5.2.D.1 Authorization is when an entity is granted permission to have a certain type of access to a resource. Access controls are put in place to control which users have what types of access to which data.
- 5.2.D.2 There are three types of access to a file in Linux that can be set, and they always come in the following order: i. Read access allows a user to view the contents of a file. ii. Write access allows a user to make changes to a file. iii. Execute access allows a user to run a binary file such as a program. These are abbreviated
rwx, respectively. If a user only has read and execute permissions (not write), then it would display asr-x. The-symbol indicates the absence of that permission. - 5.2.D.3 There are three default entities for which permissions are set and always in this order: (1) the file owner, (2) the file group, and (3) all other users. The three sets are displayed with no spaces (e.g.,
rwxrwxrwx). - 5.2.D.4 To view the current permission settings for a file, use the command
ls -l, which will show the current settings for the default entities. If there is a+symbol at the end of the permissions, this means that other permissions have been set for that file and it can be viewed with thegetfaclcommand. - 5.2.D.5 To modify the permission settings for a file, use the
chmodcommand. This command can be used with the numeric method or the symbolic method. - 5.2.D.6 To use
chmodin the numeric method the syntax ischmod ### filename.Each of the three###represents one of the three entities mentioned above (the owner, the group, other nongroup users). The first#= the owner. The second#= the group. The third#= other nongroup users. The permission for each entity is determined by adding up the values for the types of access to be granted:0= no permissions,1= execute,2= write,4= read. Therefore3sets permission to write and execute,5sets permission to read and execute,6sets permission to read and write, and7sets permission to read, write, and execute. - 5.2.D.7 To use
chmodin the symbolic method the syntax ischmod entity +(or -) permission filename.The entities are the user owner, the group, and other nongroup users. Each entity is represented with a single letter.u= user owner,g= group,o= others,a= all. Permission can be either added or removed to any combination of entities.+= add the permission,-= remove the permission. The permissions that can be set areread, write,andexecute.r= read,w= write,x= execute. Entities and permissions can be combined in a single command. To add the read and execute permissions for the group and user owner for a file calledtestfile,the command would bechmod ug+rx testfile.