Skip to content

Commit e3d1b8b

Browse files
pranlawateManagor
andauthored
chcat: add page (#18454)
Co-authored-by: Managor <[email protected]>
1 parent 8dae55c commit e3d1b8b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

pages/linux/chcat.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# chcat
2+
3+
> Change SELinux security category for files.
4+
> Categories provide an additional level of access control based on MCS (Multi-Category Security).
5+
> See also: `chcon`, `semanage`.
6+
> More information: <https://manned.org/chcat>.
7+
8+
- List all available categories:
9+
10+
`sudo chcat {{[-L|--list]}}`
11+
12+
- Add a category to a file:
13+
14+
`sudo chcat +{{CategoryName}} {{path/to/file}}`
15+
16+
- Remove a category from a file:
17+
18+
`sudo chcat -- -{{CategoryName}} {{path/to/file}}`
19+
20+
- Set specific categories for a file (replacing existing ones):
21+
22+
`sudo chcat {{CategoryName1,CategoryName2,...}} {{path/to/file}}`
23+
24+
- Display the categories of a file:
25+
26+
`ls {{[-Z|--context]}} {{path/to/file}}`
27+
28+
- Remove all categories from a file:
29+
30+
`sudo chcat {{[-d|--delete]}} {{path/to/file}}`

0 commit comments

Comments
 (0)