Skip to content
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

File.user on symlink has changed comportement #766

Open
kimiaoi opened this issue May 22, 2024 · 1 comment
Open

File.user on symlink has changed comportement #766

kimiaoi opened this issue May 22, 2024 · 1 comment

Comments

@kimiaoi
Copy link

kimiaoi commented May 22, 2024

I have some test to verify the user of a symlink. I am using a symlink to point a folder like this :

lrwxrwxrwx 1 myuser group 13 May 22 10:40 /tmp/test -> /etc/systemd/

and /etc/systemd/ is in root root

When I do host.file("/tmp/test/").user I obtain "root"

and when I do host.file("/tmp/test").user I expect to get "myuser" but instead I get "root"

The function was working fine before 10.1.0.

Will it stay like that from now or is it an issue that need to be fixed ?

For now, I will go around this issue by using host.file("/tmp/test").check_output("stat -c %%U %s", my_link_path)

thank you

jsf9k added a commit to cisagov/ansible-role-xfce-cool that referenced this issue Aug 19, 2024
Note that the test code required a little tweaking before it could
succeed due to pytest-dev/pytest-testinfra#766.
jsf9k added a commit to cisagov/ansible-role-xfce-cool that referenced this issue Aug 19, 2024
Note that the test code required a little tweaking before it could
succeed due to pytest-dev/pytest-testinfra#766.
@CarstenGrohmann
Copy link
Contributor

This change would probably be caused by d2bcd9f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants