CHCON(1) | 用戶命令 | CHCON(1) |
名稱¶
chcon - 修改文件安全上下文
概述¶
chcon [選項]...
上下文 文件...
chcon [選項]... [-u 用戶] [-r
角色] [-l 範圍] [-t
類型] 文件...
chcon [選項]...
--reference=參考文件 文件...
描述¶
將每個指定文件的安全上下文變更至指定上下文。使用 --reference 選項時,把指定文件的安全上下文設置爲與參考文件相同。
必選參數對長短選項同時適用。
- --dereference
- 影響每個符號鏈接的原始引用文件(這是默認行爲),而非符號鏈接本身
- -h, --no-dereference
- 隻影響符號鏈接,而非被引用的任何文件
- -u, --user=用戶
- 設置指定用戶的目標安全上下文
- -r, --role=角色
- 設置指定角色的目標安全上下文
- -t, --type=類型
- 設置指定類型的目標安全上下文
- -l, --range=範圍
- 設置指定範圍的目標安全上下文
- --no-preserve-root
- 不特殊對待“/”(默認行爲)
- --preserve-root
- 不允許在“/”上遞歸操作
- --reference=參考文件
- 使用指定參考文件的安全上下文,而非指定的上下文值
- -R, --recursive
- 遞歸操作文件和目錄
- -v, --verbose
- 爲每個處理的文件輸出診斷信息
以下選項是在指定了 -R 選項時被用於設置如何遍歷目錄結構體系。如果您指定了多於一個選項,那麼只有最後一個會生效。
作者¶
由 Russell Coker 和 Jim Meyering 編寫。
報告錯誤¶
GNU coreutils 的在線幫助:
<https://www.gnu.org/software/coreutils/>
請向 <https://translationproject.org/team/zh_CN.html>
報告翻譯錯誤。
版權¶
Copyright © 2020 Free Software Foundation, Inc. License
GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
參見¶
完整文檔請見:
<https://www.gnu.org/software/coreutils/chcon>
或者在本地使用: info
'(coreutils) chcon invocation'
跋¶
本頁面中文版由中文
man 手冊頁計劃提供。
中文 man
手冊頁計劃:https://github.com/man-pages-zh/manpages-zh
2020年三月 | GNU coreutils 8.32 |