Hello,
I have been stuck to this Linux ACL problem for more than 24 hr. I have used “Chmod” for the 2 first two questions and “ACL” commands for question 3 and 4. Can anyone please help me.
Thanks in advance
Hello,
I have been stuck to this Linux ACL problem for more than 24 hr. I have used “Chmod” for the 2 first two questions and “ACL” commands for question 3 and 4. Can anyone please help me.
Thanks in advance
This isn’t about chmod
. That sets simple permissions only. The clue here is ACL
. You need to use the setfacl command to set granular permissions like that.
This is how I’ve tried solving it:
Then I got the error attached below:
You are not applying the permissions to the correct file. The question in your screenshot asks you to set on /etc/resolv.conf
, not /etc/hosts
When you redo a task in KKE, the requirements for the task (e.g. files, users, hosts etc) change, so you must read the question carefully every time!
indeed the task data changes. I reapply the permissions and still doesn’t work! See screenshot below:
The task passes for me
[root@stapp02 ~]# cd /etc
[root@stapp02 etc]# getfacl hosts
# file: hosts
# owner: root
# group: root
user::rw-
group::r--
other::r--
[root@stapp02 etc]# setfacl -m u:yousuf:000 hosts
[root@stapp02 etc]# setfacl -m u:eric:r hosts
[root@stapp02 etc]# getfacl hosts
# file: hosts
# owner: root
# group: root
user::rw-
user:yousuf:---
user:eric:r--
group::r--
mask::r--
other::r--
In this attempt
getfacl
setfacl
commandsAlso setfacl -x
does not deny permission. It removes any ACL for the user specified. That means the user will get the standard permissions as set by chmod
which is not what the question asks.
You deny access with a specific deny ACL - that is the first one in my solution above.
It worked, thank you much for your help. I was not adding the “000” to remove the permissions…