sunhux
asked on
should /tmp be remounted as tmpfs or remain as xfs during hardening
on my RHEL 7, /tmp partition is shown as xfs :
$ mount |grep /tmp
/dev/mapper/rhel-tmp on /tmp type xfs (rw,nosuid,nodev,noexec,re latime,sec label,attr 2,inode64, noquota)
/dev/mapper/rhel-var_tmp on /var/tmp type xfs (rw,relatime,seclabel,attr 2,inode64, noquota)
So when doing CIS hardening, the benchmark doc suggests to remount as tmpfs:
so should I remount as xfs instead?
ie
>mount -o remount,nosuid,noexec,node v tmpfs -t tmpfs
should above be
> mount -o remount,nosuid,noexec,node v xfs -t xfs /tmp
and
in /etc/fstab
> /dev/mapper/rhel-tmp /tmp tmpfs defaults,nodev,nosuid,noex ec 0 0
should above be
> /dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noex ec 0 0
and
cat /etc/systemd/system/local- fs.target. wants/tmp. mount
[Mount]
What=tmpfs <== shd it be xfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictat ime,noexec ,nodev,nos uid
$ mount |grep /tmp
/dev/mapper/rhel-tmp on /tmp type xfs (rw,nosuid,nodev,noexec,re
/dev/mapper/rhel-var_tmp on /var/tmp type xfs (rw,relatime,seclabel,attr
So when doing CIS hardening, the benchmark doc suggests to remount as tmpfs:
so should I remount as xfs instead?
ie
>mount -o remount,nosuid,noexec,node
should above be
> mount -o remount,nosuid,noexec,node
and
in /etc/fstab
> /dev/mapper/rhel-tmp /tmp tmpfs defaults,nodev,nosuid,noex
should above be
> /dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noex
and
cat /etc/systemd/system/local-
[Mount]
What=tmpfs <== shd it be xfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
in fstab, should we remove the "defaults" or leave it there?
>defaults,nodev,nosuid,noe