Task 22 - Linux File Permission

Hi Team,

I’ve executable permission as requested but the task is mareked as failed.

Can you check and confirm on this? As per the question it says give executable permission to the script only.

image

try to give chmod 644 filename.

644 is not EXECUTE. 644 is read/write for user, read only for group and others.

I suggest to change the task description to “set random file permissions and hope that you guessed what we expect”.

1 Like

Hello,

Thank you for reporting this. Since its a bash script not a normal file so it is asked to give it executable permission so that server users can run the script later whenever needed.

Please note that in case of bash script bash is the interpreter that is actually going to execute the script and the interpreter needs to read the script so even if you have given it only executable permission the interpreter i.e bash will not be able to execute it so you had to give it read permission as well along with execute permission.

Just for reference: permissions - Can a script be executable but not readable? - Unix & Linux Stack Exchange

I hope it clears your doubt :slight_smile:

1 Like

Hello,

Since we have made some improvement in this question to make it more clear so we have marked this task as Pending for all who failed it. So all of them can give it another try.

Hi @Inderpreet. . I am also having same issue. Can you please mark this task as pending for my account as well. Thanks

Hi @zerocoolback

The task was marked pending for other users who performed it before making the improvements/corrections. But as now issues with task has been fixed so we will only consider valid answers. As we can see in your case answer seems incorrect hence task was marked as failed. Please let us know if you still have any confusions.

1 Like

how do we login as root?
i could see only the user tony for app server1 and able to login to host.
tried sudo and su but didnt worked.

1 Like

hello
try sudo -i then give your current user password so it will be login as root
:grinning: