Skip to content

平成24年度 春期 ITパスポート試験 問83

This question's explanation and your answers so far.

問83
頻出度★☆☆

ファイルaaaは表のとおりにアクセス権が設定されている。ユーザBがファイルaaaをコピーしてファイルbbbを作成できるようにするとき,ファイルaaaへのアクセス権に関する記述のうち,適切なものはどれか。

ファイル所有者アクセス権(ファイル所有者)アクセス権(ファイル所有者以外)
ユーザAR-

注記 アクセス権の意味 R:読込み可,W:書込み可,-:読込み・書込みいずれも不可

出典 平成24年度 春期 ITパスポート試験 問83
解説

問 83

  • Incorrectア

    If the access rights are left unchanged, the rights that apply to user B under “other than file owner” remain -. - means that neither reading nor writing is allowed, so B cannot even read the contents of file aaa. Copying is an operation that starts by reading the source file, so once reading is impossible, creating bbb is impossible as well, and the goal stated in the question cannot be met.

  • イ

    正解 The correct answer is イ. Reading the table, the owner of file aaa is user A, and the access rights are set as R (read allowed) for “file owner” and - (neither read nor write allowed) for “other than file owner”. User B, who appears in the question, is not the owner, so the column that applies to B is “other than file owner”; in other words, as things stand B can neither read nor write the file. Next, break the operation of “copying file aaa to create bbb” down into per-file access rights. Copying means reading the contents of the source file and creating a new file from those contents. That is, what is needed for aaa is only read (R); write (W) is not needed at all on the source file. Writing happens on the newly created bbb side, and bbb is a different file from aaa, so it has nothing to do with the access rights of aaa. Therefore, the minimum change to make on the aaa side in order to let B copy it is to add R (read allowed) to the access rights of “other than file owner”. This also matches the least privilege way of thinking, which grants only the rights that are necessary, and it achieves the goal without creating the risk that B could rewrite the contents of aaa. Hence イ is appropriate.

  • Incorrectウ

    If what is added to “other than file owner” is W (write allowed), user B merely becomes able to write to aaa and still cannot read aaa. What copying needs is read access to the source file, not write access, so this does not make it possible to create bbb. Moreover, granting W would let B overwrite and destroy the contents of aaa, handing over rights beyond what the goal requires, which also goes against the principle of least privilege.

  • Incorrectエ

    The “file owner” column holds the rights that apply only to the owner of file aaa, that is, to user A. Even if W is added there, it only lets user A write to aaa; the rights of user B, who is not the owner, stay at - and do not change at all. B still cannot read aaa, so B cannot copy it, and the state the question asks for is not reached. This choice mixes up which column, the owner one or the non-owner one, applies to whom.

ここがポイント
  • Read access rights according to the distinction of whom each right applies to. In this table the column for the owner (user A) and the column for everyone other than the owner are separate, and what applies to user B, who is not the owner, is the “other than file owner” column. R means read allowed, W means write allowed, and - means neither read nor write is allowed.
  • Break an operation down into the rights it actually needs. Copying a file is an operation that reads the source, so only R is needed on the source and W is not (the writing happens on the newly created destination). Granting only the minimum rights necessary to achieve the goal is the principle of least privilege.
用語

Your answers