Skip to content

File.user on symlink has changed comportement #766

Description

@kimiaoi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions