To check the access controls of a file, which command should be used?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command used to check the access controls of a file is getfacl. This command specifically retrieves and displays the Access Control Lists (ACLs) for files and directories. ACLs provide a more granular level of permission settings compared to the traditional file permission system in Unix-like operating systems, allowing for multiple users and groups to have different permissions on the same file.

While ls -l can display the basic file permissions, including owner, group, and others, it does not provide the detailed information that ACLs offer. getent is used for retrieving entries from databases supported by the Name Service Switch, and ldd is used to show the shared library dependencies of a program. These commands do not serve the purpose of examining access controls in the way that getfacl does. Therefore, getfacl is the most appropriate command for checking file access controls.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy