Skip to content

fcopy: Failure to copy file when uid != root #1531

@miszr

Description

@miszr

Isssue #1243 still exists.

My system is configured with systemd-networkd and systemd-resolved.

The file /etc/resolv.conf is symlinked to /run/systemd/resolve/resolv.conf with the following permissions:
-rw-r--r-- systemd-resolve systemd-resolve /run/systemd/resolve/resolv.conf

So the file is world readable, but fcopy still refuses to copy it.

The issue is that fcopy only checks the uid of the file, not respecting the actual permissions set on it.

An example where this would fail terribly is if a file owner had no permissions.

To reproduce:

  1. Create a file with a certain owner that is not root.
  2. Run fcopy as root and try to copy that file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnetworkingIssues related to networking features (--net=, etc)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions