-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using become
with connect provision on a cis hardened machine, the rsync
pulling the test results fails
#2496
Comments
It looks that it is going to be rather related with the fact that the targeted machine is CIS level 2 hardened. |
CIS hardened machines have the setfacl -d -m o:r /var/tmp/tmt |
Thanks for filing the issue and looking forward to the PR. What is an easy way to get |
@lukaszachy , this is what I use to harden machines: But it may be reproduceable by just adding There is also an ACL change: |
become
with connect provision, the rsync
pulling the test results failsbecome
with connect provision on a cis hardened machine, the rsync
pulling the test results fails
I added STRs and better description of the problem. |
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
In machines with umask set to `0027` it is necessary to setup an acl to overide it so the workdir root directory stays multi-user access. This is specially necessary on machines accessed with a non-root user, that are hardened to CIS Level 1 guidelines. Fixes: teemtee#2496 Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
The cause of this bug is because the test results are owned by
root:root
when usingbecome
and the permissions are---
forothers
. So when thersync
is executed with the non-root user, it fails because the non-root user doesn't have the needed access. This is the case because on a CIS hardened machine, the umask is set globally to 0027.I'll be providing a PR.
Steps to Reproduce:
umask 0027
to/etc/profile
and/etc/bashrc
on the targeted machine (e.g. a CentOS Stream 9 QCOW2)tmt init -t base
tmt -vv run -a provision --how=connect --guest=<ip> --user=<user> --become --key=<key>
Result (ip=192.168.122.166, user=centos):
The permissions:
As mentioned in the comments, the workaround is to create
/var/tmp/tmt
ahead of time in the targeted machine and use ACL to override theumask
:setfacl -d -m o:r /var/tmp/tmt
, or perhaps better:setfacl -d -m o:rX /var/tmp/tmt
to ensure directory access when needed.The text was updated successfully, but these errors were encountered: