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.

Unit 4 MCQs File Permissions and Ownership

CSE105 — Creative Engineering Workshop 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Linux Permission Model Easy

    In the Linux permission model, permissions are assigned to which three categories of users?

  2. Question 2 of 60 Read, Write and Execute Permissions Easy

    Which permission allows a user to view the contents of a file?

  3. Question 3 of 60 Read, Write and Execute Permissions Easy

    Which single letter represents the execute permission in Linux?

  4. Question 4 of 60 chmod (Symbolic and Numeric Modes) Easy

    In numeric (octal) mode, which digit value represents the read permission?

  5. Question 5 of 60 chmod (Symbolic and Numeric Modes) Easy

    What does the command chmod 755 file.txt set for the file owner?

  6. Question 6 of 60 chown Command Easy

    What is the primary purpose of the chown command?

  7. Question 7 of 60 umask Command Easy

    What does the umask command control?

  8. Question 8 of 60 File Ownership and Group Ownership Easy

    Every file in Linux is associated with which two ownership attributes?

  9. Question 9 of 60 Read, Write and Execute Permissions Easy

    Which permission is required to modify or delete the contents of a file?

  10. Question 10 of 60 chmod (Symbolic and Numeric Modes) Easy

    In symbolic mode, which command adds execute permission for the owner?

  11. Question 11 of 60 Linux Permission Model Easy

    In the permission string -rwxr-xr--, what does the first character - indicate?

  12. Question 12 of 60 chmod (Symbolic and Numeric Modes) Easy

    What octal value represents read and write permissions combined?

  13. Question 13 of 60 chown Command Easy

    Which command changes the owner of data.txt to the user alice?

  14. Question 14 of 60 umask Command Easy

    A common default umask value on many Linux systems is:

  15. Question 15 of 60 File Ownership and Group Ownership Easy

    Which command is specifically used to change only the group ownership of a file?

  16. Question 16 of 60 Permission Security Concepts Easy

    Why is giving 777 permissions to a file generally considered a security risk?

  17. Question 17 of 60 Linux Permission Model Easy

    How many permission bits (r, w, x) are shown for each of the three user categories?

  18. 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?

  19. Question 19 of 60 Permission Security Concepts Easy

    Which principle recommends granting users only the minimum permissions they need?

  20. Question 20 of 60 Read, Write and Execute Permissions Easy

    For a directory, which permission allows a user to enter it using cd?

  21. 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?

  22. Question 22 of 60 Read, Write and Execute Permissions Medium

    For a directory, what does the execute (x) permission actually grant?

  23. Question 23 of 60 chmod (Symbolic and Numeric Modes) Medium

    Which numeric mode is equivalent to the symbolic permission rw-r--r--?

  24. 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?

  25. 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?

  26. 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?

  27. Question 27 of 60 umask Command Medium

    With a umask of 027, what default permissions will a newly created directory receive?

  28. 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?

  29. Question 29 of 60 Permission Security Concepts Medium

    Why is assigning chmod 777 to a file generally considered a security risk?

  30. Question 30 of 60 chmod (Symbolic and Numeric Modes) Medium

    What is the effect of the command chmod a-w file.txt?

  31. Question 31 of 60 Linux Permission Model Medium

    In the permission string drwxr-x---, what does the leading d indicate?

  32. Question 32 of 60 chown Command Medium

    Which command recursively changes ownership of all files inside /var/www to user web?

  33. 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?

  34. 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?

  35. Question 35 of 60 umask Command Medium

    A colleague wants newly created files to be readable and writable only by the owner (mode 600). Which umask achieves this?

  36. Question 36 of 60 Permission Security Concepts Medium

    The principle of least privilege applied to file permissions suggests you should:

  37. 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?

  38. 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?

  39. 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?

  40. 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?

  41. 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?

  42. 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?

  43. Question 43 of 60 umask Command Hard

    With umask 027, what permissions will a newly created regular file receive (assuming default base of 666)?

  44. 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?

  45. 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?

  46. 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?

  47. 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?

  48. 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?

  49. 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?

  50. 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?

  51. 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?

  52. 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?

  53. 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?

  54. 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?

  55. 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?

  56. 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?

  57. 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?

  58. 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?

  59. Question 59 of 60 chown Command Hard

    Which chown invocation changes only the group of file.txt to admins, leaving the owner unchanged?

  60. 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?

That's unit 4

Answer a few questions and your score shows up here.