Link to home
Start Free TrialLog in
Avatar of sunhux
sunhux

asked on

"systemctl enable tmp.mount " gave "Failed to execute operation"

I performed one of the CIS RHEL 7 hardening remediation.
Got the message with <== shown below, can someone advise:

$ cat  /etc/systemd/system/local-fs.target.wants/tmp.mount
[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,noexec,nodev,nosuid

[root@mesopv1]:/etc/modprobe.d
$ systemctl unmask tmp.mount

[root@mesopv1]:/etc/modprobe.d
$ systemctl enable tmp.mount
Failed to execute operation: Invalid argument <==

[root@mesopv1]:/etc/modprobe.d
$
Avatar of sunhux
sunhux

ASKER

I'm running from root & had done "chmod 755  .../tmp.mount"
& still getting the same message
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Aside: #1 way to harden RHEL 7 is to update to RHEL 8, as the RHEL 7 Kernel is so old... to me... it's suspect to run this Kernel...
Note: systemd is the blight of the Internet. Don't feel bad if this is difficult to debug.

lol ... +1