During a security hardening, /opt/archive was added to /etc/fstab with the options defaults,noexec,nosuid,nodev. When an administrator tries to run /opt/archive/install.run, the shell returns "Permission denied". The installer must be executed immediately, but the hardened mount options must be restored automatically after the next reboot. Which single command accomplishes this goal?
The noexec mount option stops the kernel from directly executing any binary located on the affected filesystem. To lift that restriction only for the current uptime, the filesystem can be re-mounted with the exec flag. Using mount -o remount,exec /opt/archive changes just the execution setting on the existing mount; all other options remain unchanged, and the original noexec flag from /etc/fstab will be applied again at the next boot. Simply marking the file executable with chmod does not override a noexec mount, disabling SELinux does not affect mount flags, and mount -a merely re-reads /etc/fstab-which still contains noexec-so none of those alternatives enable execution.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the noexec option in /etc/fstab do?
Open an interactive chat with Bash
How does the mount command with -o remount,exec work?
Open an interactive chat with Bash
Why can't chmod or SELinux override the noexec mount option?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access