I'm working on a freshly installed CentOS7 with LVM. I want to bind mount /var/tmp to /tmp and added the following to /etc/fstab.
/tmp /var/tmp none rw,nodev,noexec,nosuid,bind 0 0
After a reboot, the /var/tmp is now mounted but not with bind option. I've also tried following entry in /etc/fstab
/tmp /var/tmp none bind 0 0
If I look at /etc/mtab. I can see my new mountpoint but no bind is displayed.
/dev/sda1 /boot ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/mapper/system-var /var ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/mapper/system-tmp /tmp ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/mapper/system-home /home ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/mapper/system-tmp /var/tmp ext4 rw,seclabel,relatime,data=ordered 0 0
Can anybody help me out with the correct /etc/fstab entry?
<ns6:pattern operation="pattern match">^[\s]*/tmp[\s]+/var/tmp[\s]+.*bind.*$</ns6:pattern>
. And we need to be SCAP compliant – fr3ak4l Jul 07 '16 at 08:42