mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1531] fcopy: Failure to copy file when uid != root #1022
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1022
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @miszr on GitHub (Sep 5, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1531
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:
@ranisalt commented on GitHub (Sep 13, 2017):
I can reproduce too, I have the same setup with systemd-resolved.
@netblue30 commented on GitHub (Sep 14, 2017):
I put a fix in for issue: https://github.com/netblue30/firejail/issues/1547
I think is the same problem,
/run/systemd/resolve/resolv.confwas blacklisted in /etc/firejail/disable-common.inc. Give it a try, thanks.@miszr commented on GitHub (Sep 14, 2017):
No, #1547 is a different issue.
I corrected mine a while back using
noblacklist /var/run/systemdin/etc/firejail/globals.local@netblue30 commented on GitHub (Sep 15, 2017):
Sorry, actualy I removed /var/run/systemd from disable-common.inc, not /run/systemd/resolve/resolv.conf. The fix is in git.
@miszr commented on GitHub (Sep 15, 2017):
This issue is NOT resolved.
The problem is using fcopy to copy a world readable file but where the owner is not the current user.
Since firejail is using SUID to get root, the current user is root.
None of the above mentioned fixes are affecting the problem.
@eomanis commented on GitHub (Sep 15, 2017):
This problem is currently preventing me from launching Steam, which I have set up to be launched in a --private= home dir.
Launching Steam:
When I copy /run/systemd/resolve/resolv.conf to /etc/resolv.conf it works again, possibly because then it belongs to root:root.
@ranisalt commented on GitHub (Sep 15, 2017):
This is giving me more issues with other apps that can't copy the resolv.conf link. The apps fail to resolve any DNS address.
@netblue30 commented on GitHub (Sep 18, 2017):
I have a fix in, give it a try. I'll reopen it if necessary, thanks.
@miszr commented on GitHub (Sep 19, 2017):
The solution does work. However I do think the solution is overly specific.
The fundamental solution should be allowing world-readable files to be copied. Not allowing a specific file to be copied.
That the issue occurred with systemd-resolved is just one case.
@ranisalt commented on GitHub (Sep 19, 2017):
It didn't work for me, apps firejailed still can't resolve DNS. I recreated the links with
firecfg.@primeroz commented on GitHub (Aug 22, 2021):
I am still having this issue with resolv.conf -> /run/systemd/....
is this supposed to be fixed ?
@solsticedhiver commented on GitHub (Apr 25, 2023):
while using firejail and transmission for a while, this bug has just poop-up on my rpi3 system, for no reason ?