A system administrator conducted a security audit and discovered that an executable file, /usr/local/bin/legacy_app, has the SUID bit set. This is considered an unnecessary security risk. The current permissions are displayed as rwsr-xr-x. Which of the following commands should be used to specifically remove the SUID permission while leaving the other permissions unchanged?
The correct command to remove the SUID (Set User ID) permission from a file is chmod u-s /usr/local/bin/legacy_app. The u-s argument in symbolic mode specifically tells chmod to remove ('-') the SUID bit ('s') from the user ('u') permissions. This is the most precise way to achieve the goal without affecting the base read, write, and execute permissions.
The chown command is incorrect because it is used to change the owner and group of a file, not its permission bits. The setcap -r command is incorrect as it is used to remove file capabilities, which is a different privilege mechanism from SUID. The chattr -s command is also incorrect; it is used for securely deleting a file's content upon removal, not for managing SUID permissions.
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 is the SUID bit on a file?
Open an interactive chat with Bash
Why is the `chmod u-s` command used to remove the SUID bit?
Open an interactive chat with Bash
How is SUID different from Linux capabilities managed by `setcap`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .