mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1243] Error fcopy: invalid file #844
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#844
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 @chiraag-nataraj on GitHub (Apr 23, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1243
I'm getting
Error fcopy: invalid filewhenever I try to useprivate-etcorprivate-bin. This is happening on Debian Sid/Experimental with Firejail 0.9.46~rc1.More specifically, I'm running into errors with this line:
private-etc Muttrc.d/,Muttrc,alternatives/,resolv.conf,ssl/,mime.types,proxychains.confbut not this line:
private-etc Muttrc,resolv.conf.Similarly, I'm running into errors with:
private-bin sh,mutt,mutt_dotlock,bash,emacsclient,elinks,gpg,gpg-agent,pinentry,dig,awkbut notprivate-bin sh,mutt,bash,emacsclient,elinks,gpg,gpg-agent,pinentry,dig,awk.Relates to:
@reinerh commented on GitHub (Apr 23, 2017):
I was able to reproduce the private-bin error:
The reason seems to be that mutt_dotlock is a suid binary.
It might be not allowed to copy it because of security reasons, but I'm not completely sure about that.
At least a more telling error message would be good.
@chiraag-nataraj commented on GitHub (Apr 24, 2017):
That's almost certainly not the problem - otherwise, the problem would only show up in
private-binbut it shows up withprivate-etcas well.@reinerh commented on GitHub (Apr 24, 2017):
On Sun, Apr 23, 2017 at 07:13:15PM -0700, ಚಿರಾಗ್ ನಟರಾಜ್ wrote:
There seem to be two cases where it can fail:
https://github.com/netblue30/firejail/blob/master/src/fcopy/main.c#L199-L204
If the file is not there or can't be stat'ed, or if the real uid/gid don't
match the file to copy.
@netblue30 commented on GitHub (Apr 24, 2017):
There are two different bugs, one with the trailing '/' char (firejail --private-etc=alternatives/) and one with the group ownership.
Fixes:
bff77f44afanddf8c4e9cd1@miszr commented on GitHub (Aug 30, 2017):
The issue still persists.
My system is configured with
systemd-networkdandsystemd-resolved.The file
/etc/resolv.confis symlinked to/run/systemd/resolve/resolv.confwith the following permissions:-rw-r--r-- systemd-resolve systemd-resolve /run/systemd/resolve/resolv.confSo the file is world readable, but fcopy still refuses to copy it.
The issue is that fcopy only checks the
uidof 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.