TMAegis
Thêm quy tắc cho linux

TMA-ROCKY9-1.1.2.1.1

Ensure /tmp is tmpfs or a separate partition

Trung bìnhCấp 1Tự độnglinux

Mô tả

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.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
if findmnt -kn /tmp >/dev/null 2>&1; then echo compliant; else echo /tmp' is not a separate partition'; fi
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

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 Note: Using Btrfs subvolumes instead of traditional disk partitions changes ho…

Thuộc tính

Hệ điều hành
rocky-9
Thẻ
cis-convertedfilesystemlinux
Tham chiếu
CIS Rocky Linux 9 Benchmark v3.0.0 - 1.1.2.1.1

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target linux