【正文】
etgid()。 ? 創(chuàng)建新用戶組 (groupadd): 命令 ./groupadd test會對文件 group進行修改,以創(chuàng)建一個新的用戶組 test。 ? 把一個用戶加入一個組 (usermod): 命令 ./usermod G group user會對文件 group進行修改,把用戶 user加入用戶組group。 ? 在文件管理功能中有相應(yīng)命令進行 資源所有者及其所在用戶組的控制 。如命令 chgrp group directory可修改目錄 directory所在的用戶組為 group。 3. 資源訪問權(quán)限 ? 資源中的用戶信息: – 文件: uid, gid――chown() – 進程: uid, gid, euid, egid――setuid(), getuid() ( real ID對應(yīng)于調(diào)用進程 ID, effective ID對應(yīng)被執(zhí)行文件的用戶 ID) ? 資源訪問權(quán)限對用戶的劃分: ugoa – 資源所有者: the user who owns it (u) – 同組用戶: other users in the file39。s group (g) – 非同組用戶: other users not in the file39。s group (o) – 所有用戶: all users (a)(這種情況相當(dāng)于前三種的組合 a=u+g+o) ? 文件訪問權(quán)限的分類: rwxXstugo前三種是基本權(quán)限,中間三種是高級執(zhí)行權(quán)限(在不同系統(tǒng)上會有不同意義),后三種是用戶權(quán)限的簡便描述; – 讀權(quán)限: read (r),讀文件內(nèi)容或列目錄中的文件列表; – 寫權(quán)限: write (w),修改文件內(nèi)容或在目錄中創(chuàng)建和刪除文件; – 可執(zhí)行權(quán)限(僅對目錄和可執(zhí)行文件有意義): execute (or access for directories) (x),把文件作為程序執(zhí)行或訪問目錄中的文件; – 僅對目錄有效的可執(zhí)行權(quán)限: execute only if the file is a directory or already has execute permission for some user (X) – 執(zhí)行時設(shè)置進程的用戶或組標(biāo)識: set user or group ID on execution (s) – 對換權(quán)限: save the program39。s text image on the swap device so it will load more quickly when run (called the sticky bit).為了快速運行程序而在對換區(qū)中創(chuàng)建程序映像;