troubleshooting Question

should /tmp be remounted as  tmpfs  or remain as  xfs  during hardening

Avatar of sunhux
sunhux asked on
LinuxLinux Security
2 Comments1 Solution165 ViewsLast Modified:
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,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/rhel-var_tmp on /var/tmp type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

So when doing CIS hardening, the benchmark doc suggests to remount as  tmpfs:
so should I remount as xfs  instead?

>mount -o remount,nosuid,noexec,nodev tmpfs -t tmpfs
should above be
> mount -o remount,nosuid,noexec,nodev xfs -t xfs /tmp


in /etc/fstab
> /dev/mapper/rhel-tmp    /tmp                    tmpfs     defaults,nodev,nosuid,noexec        0 0
should above be
> /dev/mapper/rhel-tmp    /tmp                    xfs     defaults,nodev,nosuid,noexec        0 0


cat  /etc/systemd/system/
What=tmpfs  <== shd it be xfs
David Favor
Fractional CTO
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros