Hi,
This is a screenshot taken from the RHCSA course, the first mock exam, second task:
As you can see the task is considered a success, but on the right side the SGID bit is lost when I copied the files over to their specified destination. Is this the expected behavior? And how could I pass this correctly, if there is a way to retain all permissions?
Thank you!
PS: There’s quite a bit of visual tearing in the interactive terminal especially with highlighted items as you can see in the screenshot. Not a big deal but thought I mentioned it.
Please see the cp man page. Check out the preserve options.
Grader script may be incorrectly not checking permissions, and only validating the target files are the ones that did have the given permissions
1 Like
Thank you for clarifying that. I tried for a while to get this exercise done but never managed to get the SGID copied over to the destination, even with cp --preserve all
, and I was looking forward to know the solution, but as it considers this correct I’m still left with the doubt whether this is the right behavior of cp
or if there is another way to do this?
Did you run the cp command using sudo
? User bob won’t have the rights to clone all the permissions
1 Like
Mmm that would a no… totally forgot about that as the regular cp
worked normally. I’ll keep that in mind. Thank you!