What keyword is missing in the following line from /etc/fstab in order to make a USB flash device writeable by the user fred when mounted:

/dev/sda1 /mnt/usbflash vfat defaults,users,______=fred,umask=022, 0 0

(Provide the option name only without any settings)

Answer: uid

題解

「/etc/fstab」設定檔共有 6 個欄位,分別是:

  • file system:裝置名稱(裝置檔案路徑、UUID 或是 LABEL)。
  • mount point:掛載裝置的檔案路徑。
  • type:裝置的檔案系統。
  • options:檔案系統的參數。
  • dump:是否用 dump 來進行備份。
  • pass:掛載時是否使用 fsck 工具來檢查檔案系統。

可以透過在 vfat 檔案系統的參數加上「uid=user id/name」來指定擁有者,或是加上「gid=group id/name」來指定擁有群組。