A user reports they cannot execute a script named 'deploy.sh' even though the file permissions are set to 644. What must you change to enable execution for the owner?
A junior administrator runs `ls -l /srv/payroll` and sees the permissions string `drwxrwx---` with owner `hr` and group `finance`. A member of the group `audit` needs read access to files inside this directory, and you must accomplish this without altering the permissions of any files already inside. Which approach meets the requirement?
You are reviewing the security posture of a Linux server. You want to identify which files have the SUID or SGID permission bits set, because these can pose privilege-escalation risks. Which TWO commands will list such files? (Choose two.)
A junior administrator needs to grant read and write access to a file named report.txt for the user alice, while ensuring that the file's group (finance) can read it and no one else has any access. The file currently has mode 640 and is owned by alice:finance. Which TWO commands will achieve the required permissions? (Choose two.)
An administrator is reviewing how Linux decides whether a process may open a file, and wants to confirm which statements about the permission-checking model are accurate. (Choose two.)
A developer stores a script at /home/dev/deploy.sh and wants to prevent other users on the system from reading, writing, or executing it. The file is currently owned by dev with permissions 644. Which command should the developer run?
A security administrator notices that a script located at /usr/local/bin/backup.sh has permissions -rwsr-xr-x and is owned by root:root. The administrator wants to prevent the script from running with root privileges while still allowing all users to execute it. Which command should be executed?
A security policy requires that new files created by any user on a shared project directory automatically belong to the group 'projectteam' instead of the user's primary group. Which command should the administrator run on the directory /srv/project to achieve this?
A user named dave complains that he cannot change into the directory /data/reports even though he has read permission on it. Which TWO of the following could be the reason? (Choose two.)
You are managing a directory shared by a project team. You want all files created in this directory to automatically belong to the 'developers' group, regardless of the user's primary group. Which command achieves this?
You are configuring a temporary directory where multiple users save files. To ensure that users can only delete their own files and not files created by others, what must you set?
You need to prevent a standard user from accidentally deleting a critical configuration file owned by root. Which command ensures the file cannot be modified or deleted even by the root user?
A user complains they cannot read a file. The file has permissions 640 and is owned by root, but the user is in the group that owns the file. Why can't they read it?
A junior administrator runs `chmod g+s /srv/reports` on a directory that is owned by root:finance and then creates a file inside it as the user `alice`, who is a member of the finance group. Which ownership will the newly created file have?
A developer runs `ls -l report.txt` and sees `-rw-r----- 1 alice devs 2048 May 10 09:15 report.txt`. The file must be readable by all members of the `devs` group, but currently only alice can read it. The file's group ownership is already correct. Which command will grant read access to the `devs` group without changing any other permission bits?
A junior administrator is troubleshooting a payroll application and runs 'ls -l /srv/payroll/run.sh'. The output shows '-rwxr-x--- 1 root finance 2048 Apr 10 09:14 /srv/payroll/run.sh'. A member of the 'marketing' group complains the script fails with 'Permission denied'. What is the most likely reason?
A shared project directory `/srv/team` is owned by user `lead` and group `team`. Team members must be able to create, edit, and delete each other's files, and every new file must automatically belong to the `team` group even when created by a user whose primary group is something else. The directory already has permissions `drwxrwx---`. Which single action accomplishes the group inheritance requirement?
A junior administrator needs to change the ownership of the file `/var/www/html/index.html` from user `deploy` to user `www-data`, while leaving the group ownership and all permission bits exactly as they are. Which command should be used?
An administrator creates the directory /srv/dropbox and runs 'chmod 1777 /srv/dropbox'. Users report they can create files there, but cannot delete files created by other users. Which TWO statements correctly describe this configuration? (Choose two.)
A user named alice has a primary group alice and is also a member of the group developers. She creates a new file named report.txt in her home directory. The umask is set to 022. What are the permissions of the newly created file?
A technician must create a new local account named 'intern' on a Linux workstation and wants the command to also create the home directory and skeleton files automatically. Which command accomplishes this with a single invocation on a typical distribution?
A security audit requires reviewing which local accounts exist on a Linux server, which of them have usable login shells, and which groups each account belongs to. Which TWO commands or files provide authoritative local account and group membership information? (Choose two.)
A junior administrator needs to let a colleague in the accounting group read and write the shared report at /srv/reports/q3.csv, but no one outside that group should have any access. The file is currently owned by the administrator. Which command accomplishes this by changing only the group ownership to 'accounting'?
A junior administrator runs `chmod 4755 /usr/local/bin/maintenance.sh` on a shared production server. Later, a standard user executes the script and it performs actions that the user would not normally be permitted to do. Which statement explains this behavior?
An auditor asks how to confirm which groups the currently logged-in user belongs to, including supplementary groups, from a shell prompt. Which single command displays this information for the invoking user?
A server hosts a directory /srv/dropbox that many users write into. The administrator wants every new file created inside it to automatically belong to the group 'projects' rather than each creator's primary group, without changing anyone's account settings. Which action achieves this?
A developer wants a shell script named `deploy.sh` located in the current directory to be runnable by typing `./deploy.sh`, but currently the command returns 'Permission denied' even though the file contains valid commands. Which command resolves the problem?
A contractor needs to run a diagnostic script that requires reading a log file owned by `root` with mode `640` and group `adm`. The contractor's account `contractor` has primary group `contractor` but has been added as a supplementary member of `adm`. Which statement describes what will happen when the contractor attempts to read the file?
A developer runs `mkdir /srv/collab` on an ext4 filesystem, then runs `chmod 2775 /srv/collab` so that the directory is owned by root:devteam. Later, a member of the devteam group creates a file inside /srv/collab with their default umask of 022. Which group will own the newly created file?
A developer stores a private SSH key at /home/dev/id_rsa and wants to remove all permissions for group and others while keeping full owner access, using octal notation. Which command achieves exactly this?
A user reports that a script at /usr/local/bin/backup.sh runs with the permissions of the file's owner rather than the user who invoked it, and that this behaviour is intentional for a scheduled task. Which permission bit is responsible for this behaviour?
An administrator creates a directory `/srv/dropbox` with mode 1777 so that several contractors can deposit files. Later, one contractor reports that a file they uploaded vanished, and `ls -l /srv/dropbox` shows the directory still has its sticky bit set. Which statement best explains the situation?
You are hardening a server and must ensure that ordinary users cannot read the contents of `/etc/shadow`. Which two statements about `/etc/shadow` access are correct? (Choose two.)
You are the administrator of a shared Linux workstation. A new employee needs to be added to the existing group 'research' so they can access group-owned project files. Which command accomplishes this?
A user runs `umask` and sees `0022`. They create a new regular file with `touch report.txt`. Which permissions will the new file most likely have, and why?
A user named bob has a primary group of users and is also a member of the group auditors. He creates a new file called notes.txt in his home directory. The system's default umask is 022. Which command would change the group ownership of notes.txt to auditors without altering its permissions?
A system administrator creates a shared directory /srv/collab and sets its permissions to 1777. Users report that they can create files but cannot delete files created by other users. Which statement describes the effect of the leading 1 in the permission mode?
A file named payroll.csv has permissions -rw-r-----. The user owner is carol, and the group owner is hr. A user named dave, who is not carol and not a member of hr, attempts to read the file. What will happen?
A security auditor wants to give a contractor temporary read-only access to a single log file /var/log/app/audit.log without adding the contractor to any group and without granting access to the rest of the directory. Which approach best matches least-privilege practice?
A junior administrator needs to change the permissions of the file /home/bob/notes.txt so that the owner can read and write, the group can read, and others have no access. Which command accomplishes this?
An administrator wants to allow a user named carol to read a file /etc/secure.conf that is owned by root:root with permissions 600, without changing the file's permissions or adding carol to the root group. Which command should the administrator use?