File Permissions & Ownership — Concept Check
Questions on File Permissions & Ownership. Linux file permissions control who can read, write, or execute every file. Understanding rwx, octal notation, chmod, chown, and setuid is critical for security and system administration.
Questions in this quiz
8 questions on File Permissions & Ownership — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.You have a file with permissions set to 644. What can a member of the file's group do with this file?
- ARead, write, and execute the file
- BRead the file only
- CRead and write the file
- DExecute the file
2.A developer finds that a script is not executing as expected. The script's permissions are set to 644. What should be done to resolve this?
- AChange permissions to 755
- BChange permissions to 600
- CChange permissions to 444
- DChange permissions to 777
3.A system administrator wants to ensure that only the owner can modify a configuration file, but others can read it. Which permission setting should be used?
- A777
- B755
- C644
- D600
4.A user receives a 'Permission denied' error when trying to delete a file in /tmp. The permissions for /tmp are set to 1777. Why can't the user delete the file?
- AThe sticky bit prevents deletion by non-owners
- BThe user lacks execute permission
- CThe file is owned by root
- DThe file is read-only
5.A file has permissions set to 777. What is a potential risk of this setting?
- AOnly the owner can read the file
- BThe file cannot be executed
- CThe file is hidden from others
- DAnyone can modify or delete the file
6.A developer uses 'chmod +x script.sh'. What effect does this have on the file permissions?
- AAdds execute permission for the group only
- BRemoves execute permission for all users
- CAdds execute permission for all users
- DAdds execute permission for the owner only
7.A directory is set with permissions 2755. What does the '2' in the permission signify?
- AOnly the owner can create files
- BFiles inherit the directory's group
- CFiles inherit the directory's owner
- DOnly the owner can delete files
8.A user changes a file's permissions to 400. What can the owner do with this file?
- ARead the file only
- BRead, write, and execute the file
- CRead and write the file
- DExecute the file