Which of the following commands will you execute?

You work as a Network Administrator for McRoberts Inc. The company has a Linux-based
network.
You have created a script named lf.cgi. You want to provide the following permissions on it:
rwsr-sr– Which of the following commands will you execute?

You work as a Network Administrator for McRoberts Inc. The company has a Linux-based
network.
You have created a script named lf.cgi. You want to provide the following permissions on it:
rwsr-sr– Which of the following commands will you execute?

A.
chmod 2754

B.
chmod 4754

C.
chmod 6754

D.
chmod 7754

Explanation:

According to the question, the permission set requires setting SID with the owner and the group.
Moreover, the Read, Write, and Execute permissions on the script file are required for the owner,
Read and Execute permissions for the group, and Read permission for others.
The chmod command is used to change the permissions. The last three digits, i.e., 754 will
provide the required permissions to the owner, group, and others. The digit 7 will provide the
Read, Write, and Execute permissions to the owner.
The digit 5 will provide the Read and
Execute permissions to the group. The digit 4 will provide the Read permission to others.
According to the question, you have to set SID for the owner and users. For the owner (SUID), you
will have to add 4 as a prefix to the permission number. For the group (SGID), you will have to add
2 as a prefix to it. For setting both the
SIDs (SUID and SGID), you will have to add 6 as a prefix to the permission set. Hence, in order to
accomplish the task, you will have to run the following command:
chmod 6754
This will set the SID for the owner and group on the permission set of the lf.cgi script file. When
SID is set, the Execute permission symbol x is replaced with s.



Leave a Reply 0

Your email address will not be published. Required fields are marked *