add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

33
pages.zh/linux/chcon.md Normal file
View File

@@ -0,0 +1,33 @@
# chcon
> 更改文件或文件夹的SELinux安全上下文。
> 另见:`secon``restorecon``semanage-fcontext`。
> 更多信息:<https://www.gnu.org/software/coreutils/chcon>。
- 查看文件的安全上下文:
`ls -lZ {{path/to/file}}`
- 使用参考文件更改目标文件的安全上下文:
`chcon --reference={{reference_file}} {{target_file}}`
- 更改文件的完整SELinux安全上下文
`chcon {{user}}:{{role}}:{{type}}:{{range/level}} {{filename}}`
- 仅更改SELinux安全上下文中的用户部分
`chcon -u {{user}} {{filename}}`
- 仅更改SELinux安全上下文中的角色部分
`chcon -r {{role}} {{filename}}`
- 仅更改SELinux安全上下文中的类型部分
`chcon -t {{type}} {{filename}}`
- 仅更改SELinux安全上下文中的范围/级别部分:
`chcon -l {{range/level}} {{filename}}`