Skip to content

Commit 5f8b307

Browse files
author
Andrei Zheregelia
committed
CLOS-3846: Document cagefsctl --enable/disable-cagefs-no-dev-log commands
Add the two new cagefsctl commands to the CLI reference table and update the CageFS Syslog section with usage instructions for the cagefs-no-dev-log feature flag.
1 parent 8094524 commit 5f8b307

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,17 +2919,42 @@ add <span class="notranslate"> `clean_user_php_sessions=false` line to _/etc/sys
29192919
#### Syslog
29202920
29212921
2922-
By default, <span class="notranslate"> _/dev/log_ </span> should be available inside end user's <span class="notranslate"> CageFS </span> . This is needed so that user's cronjobs and other things that user <span class="notranslate"> _dev/log_ </span> would get recorded in the system log files.
2922+
By default, <span class="notranslate"> _/dev/log_ </span> should be available inside end user's <span class="notranslate"> CageFS </span> . This is needed so that user's cronjobs and other things that use <span class="notranslate"> _/dev/log_ </span> would get recorded in the system log files.
2923+
2924+
##### Disabling /dev/log in CageFS
2925+
2926+
To disable <span class="notranslate"> _/dev/log_ </span> inside CageFS (for example, to reduce the attack surface), use the <span class="notranslate"> `cagefs-no-dev-log` </span> feature flag:
2927+
2928+
<div class="notranslate">
2929+
2930+
```
2931+
cagefsctl --enable-cagefs-no-dev-log
2932+
```
2933+
</div>
2934+
2935+
This command removes <span class="notranslate"> _/dev/log_ </span> from the CageFS skeleton, updates the syslog configuration, and remounts all CageFS users. User processes inside CageFS will no longer be able to write to the system log via <span class="notranslate"> _/dev/log_ </span>.
2936+
2937+
To restore <span class="notranslate"> _/dev/log_ </span> in CageFS:
2938+
2939+
<div class="notranslate">
2940+
2941+
```
2942+
cagefsctl --disable-cagefs-no-dev-log
2943+
```
2944+
</div>
2945+
2946+
:::tip Note
2947+
On systems using <span class="notranslate"> rsyslog </span>, the syslog socket is controlled via the file <span class="notranslate"> _/etc/rsyslog.d/schroot.conf_ </span> with the following content:
29232948
2924-
This is controlled using file <span class="notranslate"> _/etc/rsyslog.d/schroot.conf_ </span> with the following content:
29252949
<div class="notranslate">
29262950
29272951
```
29282952
$AddUnixListenSocket /usr/share/cagefs-skeleton/dev/log
29292953
```
29302954
</div>
29312955
2932-
To remove presence of <span class="notranslate"> _dev/log_ </span> inside CageFS, remove that file, and restart rsyslog service.
2956+
The <span class="notranslate"> `--enable-cagefs-no-dev-log` </span> and <span class="notranslate"> `--disable-cagefs-no-dev-log` </span> commands manage this configuration automatically. Manual editing of rsyslog configuration is no longer necessary.
2957+
:::
29332958
29342959
29352960
#### Excluding mount points

docs/cloudlinuxos/command-line_tools/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Options:
5050
| | <span class="notranslate"> --force-update </span> |force update of CageFS (ignore period of update)|
5151
| | <span class="notranslate"> --force-update-etc </span> |force update of _/etc_ directories for users in CageFS|
5252
| | <span class="notranslate"> --reconfigure-cagefs </span> |configure CageFS integration with other software (control panels, database servers, etc)|
53+
| | <span class="notranslate"> --enable-cagefs-no-dev-log </span> |stop creating <span class="notranslate"> _/dev/log_ </span> inside CageFS skeleton and remount all users (see [Syslog](/cloudlinuxos/cloudlinux_os_components/#syslog))|
54+
| | <span class="notranslate"> --disable-cagefs-no-dev-log </span> |restore <span class="notranslate"> _/dev/log_ </span> inside CageFS skeleton and remount all users (see [Syslog](/cloudlinuxos/cloudlinux_os_components/#syslog))|
5355

5456
Use the following syntax to manage users:
5557
<span class="notranslate"> `/usr/sbin/cagefsctl [OPTIONS] username [more usernames]` </span>

0 commit comments

Comments
 (0)