Skip to content

Commit

Permalink
使用者管理 - 新增可自由編輯網站內容的 web-admin 使用者群組
Browse files Browse the repository at this point in the history
    搭配 setgid 可以使得目錄內項目可以任意編輯

    Refer-to: setuid - Wikipedia <https://en.wikipedia.org/wiki/Setuid#GUID>

    ```
    2770 on a directory named 'music' owned by the user 'root' and the group 'engineers'

    A user named 'torvalds' who belongs primarily to the group 'torvalds' but secondarily to the group 'engineers' makes a directory named 'electronic' under the directory named 'music'. The group ownership of the new directory named 'electronic' inherits 'engineers.' This is the same when making a new file named 'imagine.txt'

    Without GUID the group ownership of the new directory/file would have been 'torvalds' as that is the primary group of user 'torvalds'.
    ```
    A user named 'torvalds' who belongs primarily to the group 'torvalds' bu
t secondarily to the group 'engineers' makes a directory named 'electronic'
under the directory named 'music'. The group ownership of the new directory
named 'electronic' inherits 'engineers.' This is the same when making a new
file named 'imagine.txt'

    Without GUID the group ownership of the new directory/file would have be

    Refer-to: SystemGroups - Debian Wiki <https://wiki.debian.org/SystemGroups>

    ```
    www-data: Some web servers run as www-data. Web content should not be owned by this user, or a compromised web server would be able to rewrite a web site. Data written out by web servers, including log files, will be owned by www-data.
    ```

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
  • Loading branch information
brlin-tw authored and 海洋大學網路發展協會網站托管服務自己 committed Dec 16, 2016
1 parent 659c56f commit 2fcd246
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions group
Expand Up @@ -54,3 +54,4 @@ ssh:x:114:
lpadmin:x:115:Lin-Buo-Ren
sambashare:x:116:Lin-Buo-Ren
Lin-Buo-Ren:x:1000:
web-admin:x:1001:

0 comments on commit 2fcd246

Please sign in to comment.