<tr id="frcqn"></tr>
<strong id="frcqn"><optgroup id="frcqn"></optgroup></strong>
<tr id="frcqn"></tr>
<tr id="frcqn"></tr>
<tr id="frcqn"></tr>
  • 0712-2888027 189-8648-0214
    微信公眾號

    孝感風信網絡科技有限公司微信公眾號

    當前位置:主頁 > 技術支持 > Linux > Linux使用用戶組來為用戶賦予指定目錄的讀寫權限

    Linux使用用戶組來為用戶賦予指定目錄的讀寫權限

    時間:2023-11-04來源:風信官網 點擊: 2244次
    1、 如果用戶已經擁有了默認的用戶組(通常組名與用戶名相同),就可以簡單的通過變更文件夾的所屬用戶組來完成。

    # chgrp tecmint /shares/project1/reports

    另外,我們也可以通過以下方法為多個用戶(需要賦予指定目錄讀寫權限的)新建一個用戶組。如此一來,也就創建了一個共享目錄。

    # groupadd projects

    2、 接下來將用戶 tecmint 添加到 projects 組中:

    # usermod -aG projects tecmint # add user to projects
    # groups tecmint # check users groups

    3、 將目錄的所屬用戶組變更為 projects:

    # chgrp projects /shares/project1/reports

    4、 現在,給組成員設置讀寫權限。

    # chmod -R 0760 /shares/projects/reports
    # ls -l /shares/projects/ #check new permissions

    好了!這篇教程中,我們向您展示了如何在 Linux 中將指定目錄的讀寫權限賦予用戶。
    欄目列表
    推薦內容
    熱點內容
    展開
    强奸乱伦之影音先锋,播放器男女免费,精品一区二区自拍偷拍,xxxxx日韩
    <tr id="frcqn"></tr>
    <strong id="frcqn"><optgroup id="frcqn"></optgroup></strong>
    <tr id="frcqn"></tr>
    <tr id="frcqn"></tr>
    <tr id="frcqn"></tr>