Linux distributions
TMA-ROCKY8-1.1.2.1.1
Ensure /tmp is tmpfs or a separate partition
說明
The /tmp directory is a world-writable directory used for temporary storage by all users and some applications. Note: If an entry for /tmp exists in /etc/fstab it will take precedence over entries in a systemd unit file. There is an exception to this when a system is diskless and connected to iSCSI, entries in /etc/fstab may not take precedence over a systemd unit file.
檢查方式
稽核方法: Shell 指令
if findmnt -kn /tmp >/dev/null 2>&1; then echo compliant; else echo /tmp' is not a separate partition'; fi- 預期輸出
compliant
修補方式
修補方法: 操作指南或基礎設施修補檔
First ensure that systemd is correctly configured to ensure that /tmp will be mounted at boot time. # systemctl unmask tmp.mount For specific configuration requirements of the /tmp mount for your environment, modify /etc/fstab. Example of using tmpfs with specific mount options: tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime,size=2G 0 0 Note: the size=2G is an example of setting a specific size for tmpfs. Example of using a volume or disk with specific mount options. The source location of the volume or disk will vary depending on your environment: <device> /tmp <fstype> defaults,nodev,nosuid,noexec 0 0
屬性
- 作業系統
- rocky-8
- 標籤
- cis-convertedfilesystemlinux
- 參考資料
- CIS Rocky Linux 8 Benchmark v3.0.0 - 1.1.2.1.1
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
tmaegis scan --target linux