Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
In the Linux permission model, permissions are assigned to which three categories of users?
Not quite. Try another option.
Answer: Owner, Group, Others
Linux defines permissions for three categories: the file owner (user), the group, and others (everyone else).
Question 2 of 60 · Read, Write and Execute Permissions · Easy
Which permission allows a user to view the contents of a file?
Not quite. Try another option.
Answer: Read
The read (r) permission allows viewing the contents of a file or listing a directory's entries.
Question 3 of 60 · Read, Write and Execute Permissions · Easy
Which single letter represents the execute permission in Linux?
Not quite. Try another option.
Answer: x
The execute permission is represented by the letter x, allowing a file to be run as a program.
Question 4 of 60 · chmod (Symbolic and Numeric Modes) · Easy
In numeric (octal) mode, which digit value represents the read permission?
Not quite. Try another option.
Answer: 4
In octal notation, read = 4, write = 2, and execute = 1.
Question 5 of 60 · chmod (Symbolic and Numeric Modes) · Easy
What does the command chmod 755 file.txt set for the file owner?
Not quite. Try another option.
Answer: Read, write, and execute
The digit 7 = 4 + 2 + 1, granting the owner read, write, and execute permissions.
Question 6 of 60 · chown Command · Easy
What is the primary purpose of the chown command?
Not quite. Try another option.
Answer: Change the owner of a file
The chown (change owner) command changes the user ownership of a file or directory.
Question 7 of 60 · umask Command · Easy
What does the umask command control?
Not quite. Try another option.
Answer: Default permissions for new files
The umask value determines the default permissions assigned to newly created files and directories by masking bits out.
Question 8 of 60 · File Ownership and Group Ownership · Easy
Every file in Linux is associated with which two ownership attributes?
Not quite. Try another option.
Answer: A user owner and a group owner
Each file has a user (owner) and a group associated with it, controlling access rights.
Question 9 of 60 · Read, Write and Execute Permissions · Easy
Which permission is required to modify or delete the contents of a file?
Not quite. Try another option.
Answer: Write
The write (w) permission allows a user to modify or delete the contents of a file.
Question 10 of 60 · chmod (Symbolic and Numeric Modes) · Easy
In symbolic mode, which command adds execute permission for the owner?
Not quite. Try another option.
Answer: chmod u+x file
In symbolic mode, u means user (owner) and +x adds the execute permission.
Question 11 of 60 · Linux Permission Model · Easy
In the permission string -rwxr-xr--, what does the first character - indicate?
Not quite. Try another option.
Answer: It is a regular file
The first character indicates the file type. A - denotes a regular file, while d denotes a directory.
Question 12 of 60 · chmod (Symbolic and Numeric Modes) · Easy
What octal value represents read and write permissions combined?
Not quite. Try another option.
Answer: 6
Read (4) + Write (2) = 6, granting both read and write permissions.
Question 13 of 60 · chown Command · Easy
Which command changes the owner of data.txt to the user alice?
Not quite. Try another option.
Answer: chown alice data.txt
The syntax is chown <new_owner> <file>, so chown alice data.txt sets alice as the owner.
Question 14 of 60 · umask Command · Easy
A common default umask value on many Linux systems is:
Not quite. Try another option.
Answer: 022
A typical default umask is 022, which removes write permission for group and others on new files.
Question 15 of 60 · File Ownership and Group Ownership · Easy
Which command is specifically used to change only the group ownership of a file?
Not quite. Try another option.
Answer: chgrp
The chgrp command changes the group ownership of a file or directory.
Question 16 of 60 · Permission Security Concepts · Easy
Why is giving 777 permissions to a file generally considered a security risk?
Not quite. Try another option.
Answer: It allows everyone to read, write, and execute
A permission of 777 grants full access to owner, group, and others, letting anyone modify or run the file.
Question 17 of 60 · Linux Permission Model · Easy
How many permission bits (r, w, x) are shown for each of the three user categories?
Not quite. Try another option.
Answer: 3
Each category (owner, group, others) has 3 permission bits: read, write, and execute.
Question 18 of 60 · chmod (Symbolic and Numeric Modes) · Easy
In symbolic mode, what does the letter a stand for in chmod a+r file?
Not quite. Try another option.
Answer: All users
In symbolic mode, a means all (owner, group, and others combined).
Question 19 of 60 · Permission Security Concepts · Easy
Which principle recommends granting users only the minimum permissions they need?
Not quite. Try another option.
Answer: Principle of least privilege
The principle of least privilege minimizes risk by giving users only the access necessary for their tasks.
Question 20 of 60 · Read, Write and Execute Permissions · Easy
For a directory, which permission allows a user to enter it using cd?
Not quite. Try another option.
Answer: Execute
On a directory, the execute (x) permission allows a user to enter (traverse) it with cd.
Question 21 of 60 · Linux Permission Model · Medium
A file listing shows -rwxr-xr--. Which set of users has permission to modify the contents of this file?
Not quite. Try another option.
Answer: Only the owner
The permission string breaks into owner (rwx), group (r-x), and others (r--). Only the owner has the w (write) bit set, so only the owner can modify contents.
Question 22 of 60 · Read, Write and Execute Permissions · Medium
For a directory, what does the execute (x) permission actually grant?
Not quite. Try another option.
Answer: The ability to enter the directory and access its files
On directories, x means the directory can be traversed (cd into it) and its entries accessed. Listing names requires r; execute alone is not enough to ls contents meaningfully.
Question 23 of 60 · chmod (Symbolic and Numeric Modes) · Medium
Which numeric mode is equivalent to the symbolic permission rw-r--r--?
Not quite. Try another option.
Answer: 644
rw- = , r-- = , r-- = , giving .
Question 24 of 60 · chmod (Symbolic and Numeric Modes) · Medium
A file has mode 600. Which command adds read and execute permission for the group without altering the owner's permissions?
Not quite. Try another option.
Answer: chmod g+rx file
g+rx adds read and execute only to the group class and leaves owner and others untouched. The numeric form 655 would also change others, and o+rx targets the wrong class.
Question 25 of 60 · chown Command · Medium
Which command changes both the owner to alice and the group to staff for report.txt in a single invocation?
Not quite. Try another option.
Answer: chown alice:staff report.txt
The syntax chown user:group file sets owner and group together. The colon separates the user and group names.
Question 26 of 60 · umask Command · Medium
If the umask is set to 022, what will be the default permission of a newly created regular file?
Not quite. Try another option.
Answer: 644
Files start from base 666. Subtracting the umask bits: (i.e., write is removed from group and others).
Question 27 of 60 · umask Command · Medium
With a umask of 027, what default permissions will a newly created directory receive?
Not quite. Try another option.
Answer: 750
Directories start from base 777. Applying the umask: , giving owner full access, group read+execute, and others nothing.
Question 28 of 60 · File Ownership and Group Ownership · Medium
A user bob is not the owner of data.log but belongs to its group. The file mode is 640. What can bob do?
Not quite. Try another option.
Answer: Read the file but not write to it
Mode 640 gives the group r-- (read only). Since bob matches the group class, he can read but cannot write or execute.
Question 29 of 60 · Permission Security Concepts · Medium
Why is assigning chmod 777 to a file generally considered a security risk?
Not quite. Try another option.
Answer: It allows any user to read, modify, and execute the file
Mode 777 grants full read, write, and execute to owner, group, and others, letting any user tamper with or run the file — a common misconfiguration.
Question 30 of 60 · chmod (Symbolic and Numeric Modes) · Medium
What is the effect of the command chmod a-w file.txt?
Not quite. Try another option.
Answer: Removes write permission from owner, group, and others
The a class means all (owner, group, others), and -w removes the write bit from every class, making the file read-only for everyone.
Question 31 of 60 · Linux Permission Model · Medium
In the permission string drwxr-x---, what does the leading d indicate?
Not quite. Try another option.
Answer: The entry is a directory
The first character is the file type. d denotes a directory, - a regular file, l a symbolic link, and so on.
Question 32 of 60 · chown Command · Medium
Which command recursively changes ownership of all files inside /var/www to user web?
Not quite. Try another option.
Answer: chown -R web /var/www
The -R (uppercase) flag applies the ownership change recursively to the directory and everything within it.
Question 33 of 60 · Read, Write and Execute Permissions · Medium
A user has write permission on a directory but only read permission on a file inside it. Can the user delete that file?
Not quite. Try another option.
Answer: Yes, because deletion depends on directory write permission
Removing a file modifies the directory entry, not the file itself. Write (and execute) permission on the directory governs deletion, regardless of the file's own permissions.
Question 34 of 60 · chmod (Symbolic and Numeric Modes) · Medium
Which numeric mode grants the owner full permissions, the group read and execute, and others execute only?
A colleague wants newly created files to be readable and writable only by the owner (mode 600). Which umask achieves this?
Not quite. Try another option.
Answer: 066
Files start at 666. To reach 600, remove read and write from group and others: . A umask of 077 would give 600 too for the mask bits but also masks execute unnecessarily; the exact subtraction yielding 600 from 666 is 066.
Question 36 of 60 · Permission Security Concepts · Medium
The principle of least privilege applied to file permissions suggests you should:
Not quite. Try another option.
Answer: Grant only the minimum permissions each user actually needs
Least privilege minimizes risk by giving users and processes only the access required for their tasks, limiting damage from mistakes or compromise.
Question 37 of 60 · File Ownership and Group Ownership · Medium
Which command can a regular (non-root) user use to change only the group of a file they own to a group they belong to?
Not quite. Try another option.
Answer: chgrp groupname file
chgrp lets the file owner reassign the group, provided they are a member of the target group. Changing the owner typically requires root.
Question 38 of 60 · chmod (Symbolic and Numeric Modes) · Medium
Starting from mode 755, what mode results after running chmod g-x,o-rx file?
Not quite. Try another option.
Answer: 744
755 is rwxr-xr-x. Removing execute from group gives r--; removing read+execute from others gives ---. Result: rwxr--r--... wait, others become ---. Owner 7, group 4, others 0 → but distractor. Correct calculation: owner rwx=7, group r--=4, others ---=0, giving 740.
Question 39 of 60 · Linux Permission Model · Medium
When multiple permission classes could apply, which class does Linux use to check access for a user who owns the file?
Not quite. Try another option.
Answer: The owner (user) permissions only
Linux checks classes in order: if the user is the owner, only the owner bits apply — even if group or others would grant more. Ownership is evaluated first and exclusively.
Question 40 of 60 · Permission Security Concepts · Medium
A shell script needs to be run by its owner but should never be modified by anyone. Which mode best fits this requirement?
Not quite. Try another option.
Answer: 500
Mode 500 (r-x------) lets the owner read and execute but denies write to everyone, including the owner, preventing accidental or unauthorized modification while still allowing execution.
Question 41 of 60 · chmod (Symbolic and Numeric Modes) · Hard
A file script.sh currently has permissions -rw-r--r--. Which single chmod command sets it to -rwxr-xr-- using symbolic mode without affecting the read bits already present?
Not quite. Try another option.
Answer: chmod u+x,g+x script.sh
Target is rwx r-x r--: owner and group gain execute, others stay r--. chmod u+x,g+x adds execute only to user and group. a+x, ug+x applied to others (or all) would give others execute too, which is not wanted.
Question 42 of 60 · chmod (Symbolic and Numeric Modes) · Hard
The numeric mode 4755 is applied to an executable. What is the security significance of the leading 4?
Not quite. Try another option.
Answer: It sets the SUID bit, so the program runs with the file owner's privileges
The leading octal digit encodes special bits: 4=SUID, 2=SGID, 1=sticky. SUID (4) makes the process assume the file owner's effective UID during execution, a common privilege-escalation concern.
Question 43 of 60 · umask Command · Hard
With umask 027, what permissions will a newly created regular file receive (assuming default base of 666)?
Not quite. Try another option.
Answer: -rw-r----- (640)
Files start from base 666. Subtracting the umask bits: via bitwise clearing gives = -rw-r-----. The execute bit is never added to files by default regardless of umask.
Question 44 of 60 · umask Command · Hard
A directory is created while umask is 022. What are the resulting directory permissions, and why do they differ from a file created under the same umask?
Not quite. Try another option.
Answer: 755 — directories use base 777, files use base 666
Directories are created from base 777 (execute needed to enter them), files from 666. Applying umask 022: for the directory and for a file.
Question 45 of 60 · Permission Security Concepts · Hard
A directory has permissions -rwxr-xr-x and contains a file secret.txt with ---------- (000). User bob, who is not the owner and not in the group, is able to delete secret.txt. What best explains this?
Not quite. Try another option.
Answer: Delete permission depends on write+execute on the parent directory, not the file itself
Deleting a file modifies the directory entry, so it requires write and execute permission on the containing directory, not on the file. The file's own 000 permissions are irrelevant to deletion.
Question 46 of 60 · Permission Security Concepts · Hard
The /tmp directory typically has permissions drwxrwxrwt. What does the trailing t accomplish in a world-writable directory?
Not quite. Try another option.
Answer: Only a file's owner (or root) can delete or rename that file, despite world write
The sticky bit (t) on a directory restricts deletion/renaming so that only the file owner, directory owner, or root can remove a file—critical for shared directories like /tmp.
Question 47 of 60 · chown Command · Hard
As root, which command changes ownership of data/ and everything inside it to user alice and group dev, in one recursive invocation?
Not quite. Try another option.
Answer: chown -R alice:dev data/
chown -R user:group target recursively sets both owner and group. The user:group syntax (colon separator) is the standard form; -R (capital) enables recursion. Lowercase -r is not the recursion flag for chown.
Question 48 of 60 · chown Command · Hard
A non-root user alice owns report.txt. She runs chown bob report.txt and it fails with 'Operation not permitted'. Why?
Not quite. Try another option.
Answer: On Linux, only root may give away ownership of a file to another user
Linux restricts chown transfers to root. A regular user cannot give a file to another user (this prevents quota/abuse tricks). A non-root user may only change the group to one they belong to via chgrp.
Question 49 of 60 · Read, Write and Execute Permissions · Hard
A directory logs/ has permissions d--x--x--x (111). A user knows a file is named app.log inside it. What can that user do?
Not quite. Try another option.
Answer: Access app.log by exact name (if file perms allow), but cannot list directory contents
Execute (x) on a directory permits traversal—accessing entries by known name. Read (r) is what allows listing contents. With --x only, you can cd/open a known file but ls fails.
Question 50 of 60 · Read, Write and Execute Permissions · Hard
A file has permissions -r--rw-r--. The owner alice wants to append data to it but cannot. Meanwhile group members can write. Why can't the owner write?
Not quite. Try another option.
Answer: Permission checks stop at the owner class since alice matches it, ignoring group bits
Linux evaluates the most specific matching class only. Since alice is the owner, her access is governed solely by the owner bits (r--)—no write. The more permissive group bits do not apply to the owner.
Question 51 of 60 · Linux Permission Model · Hard
In the permission model, the three-class hierarchy (user, group, other) is checked in a specific order. If a user is both the file owner AND a member of the file's group, which permissions apply?
Not quite. Try another option.
Answer: Only the owner (user) class permissions apply
The kernel checks classes in order user → group → other and applies the first match exclusively. Being the owner short-circuits the check; group and other bits are never consulted for that user.
Question 52 of 60 · chmod (Symbolic and Numeric Modes) · Hard
You run chmod 1770 shared/ on a directory owned by group team. What combined effect does this produce?
Not quite. Try another option.
Answer: Sticky bit set; owner and group have full access; others have none
Leading 1 = sticky bit. 770 gives rwx to owner and group, nothing to others. This is a common pattern for a shared team directory where members collaborate but cannot delete each other's files.
Question 53 of 60 · chmod (Symbolic and Numeric Modes) · Hard
The symbolic command chmod g=u file is applied to a file with mode 754. What is the resulting numeric mode?
Not quite. Try another option.
Answer: 774
g=u sets group permissions equal to the current user permissions. Owner is rwx (7), so group becomes rwx (7). Others (4) are unchanged. Result: 774.
Question 54 of 60 · Permission Security Concepts · Hard
Why is setting the SUID bit on a shell script (e.g., a .sh file) generally ineffective on modern Linux systems?
Not quite. Try another option.
Answer: The kernel ignores SUID on interpreted scripts to prevent interpreter-based privilege escalation
Most modern kernels ignore SUID/SGID on scripts because the interpreter (not the script) runs, opening race conditions and injection attacks. SUID reliably applies only to compiled binaries.
Question 55 of 60 · File Ownership and Group Ownership · Hard
The SGID bit is set on a directory project/ (drwxrwsr-x). A user creates a new file inside it. What group does the new file receive?
Not quite. Try another option.
Answer: The group of the project/ directory, not the user's primary group
SGID on a directory causes new files/subdirectories to inherit the directory's group ownership rather than the creating user's primary group—useful for keeping shared project files in a common group.
Question 56 of 60 · umask Command · Hard
A developer wants newly created files to be -rw------- (600) and directories -rwx------ (700). Which umask achieves this?
Not quite. Try another option.
Answer: 077
Umask 077 clears all group and other bits. Files: ; directories: . This maximally private umask is common for security-sensitive accounts.
Question 57 of 60 · Linux Permission Model · Hard
In the output -rwsr-xr-x, the s appears in the owner's execute position. What does this indicate about the owner's execute permission itself?
Not quite. Try another option.
Answer: SUID is set AND the owner still has execute permission (lowercase s)
A lowercase s means the special bit (SUID here) is set and the underlying execute bit is also present. An uppercase S would mean the special bit is set but execute is absent.
Question 58 of 60 · File Ownership and Group Ownership · Hard
A user carol belongs to groups staff (primary) and finance (supplementary). A file is owned by group finance with mode -rw-rw----. Can carol write to it?
Not quite. Try another option.
Answer: Yes — supplementary group membership grants the group permissions
Linux considers all of a user's groups (primary and supplementary) when matching the group class. Since carol is in finance, she gets the group's rw- access to the file.
Question 59 of 60 · chown Command · Hard
Which chown invocation changes only the group of file.txt to admins, leaving the owner unchanged?
Not quite. Try another option.
Answer: chown :admins file.txt
Prefixing the group with a colon (:admins) and omitting the user changes only the group. admins: (trailing colon) sets the group to the user's login group; a bare admins changes only the owner.
Question 60 of 60 · Read, Write and Execute Permissions · Hard
A user has read (r) but not execute (x) permission on a directory. What is the practical consequence?
Not quite. Try another option.
Answer: They can list file names (ls) but cannot access any file's contents or metadata
Read on a directory allows listing entry names, but without execute you cannot traverse into it to stat or open files. So ls shows names, but ls -l fails to retrieve details and files cannot be opened.
That's unit 4
Answer a few questions and your score shows up here.
Nearly through. Did unit 4 of CSE105 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 4 of CSE105 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.