[GH-ISSUE #2820] fcopy size limit is not adjustable #1767

Closed
opened 2026-05-05 08:26:18 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @maxhaslbeck on GitHub (Jul 2, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2820

hi,

I add an folder to private-home that happens to be bigger than 500MB in

firejail --noprofile --private-home=MYFOLDER MYCOMMAND

i get the error message

Error fcopy: size limit of 500MB reached

is there a reason for the size limit in fcopy? can I increase it easily?
are large files in the private-home discouraged?
Is there a simple workaround to get MYFOLDER available within the jail?

cheers,
max

Originally created by @maxhaslbeck on GitHub (Jul 2, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2820 hi, I add an folder to private-home that happens to be bigger than 500MB in ``` firejail --noprofile --private-home=MYFOLDER MYCOMMAND ``` i get the error message ``` Error fcopy: size limit of 500MB reached ``` is there a reason for the size limit in fcopy? can I increase it easily? are large files in the private-home discouraged? Is there a simple workaround to get MYFOLDER available within the jail? cheers, max
gitea-mirror 2026-05-05 08:26:18 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rusty-snake commented on GitHub (Jul 2, 2019):

limit is set here

are large files in the private-home discouraged?

Becauce the fiels are copied, there are large performace losing while starting the programm.

Is there a simple workaround to get MYFOLDER available within the jail?

I recommend to use whitelist and overlayfs-tmpfs instead of private-home, because it is faster.

<!-- gh-comment-id:507597694 --> @rusty-snake commented on GitHub (Jul 2, 2019): limit is set [here](https://github.com/netblue30/firejail/blob/master/src/fcopy/main.c#L30) > are large files in the private-home discouraged? Becauce the fiels are copied, there are large performace losing while starting the programm. > Is there a simple workaround to get MYFOLDER available within the jail? I recommend to use `whitelist` and `overlayfs-tmpfs` instead of `private-home`, because it is faster.
Author
Owner

@Vincent43 commented on GitHub (Jul 2, 2019):

Unlike private-home, overlayfs-tmpfs isn't persistent. More equivalent option is overlay-named but we have reports that it may be broken in recent kernels.

<!-- gh-comment-id:507611215 --> @Vincent43 commented on GitHub (Jul 2, 2019): ~~Unlike `private-home`, `overlayfs-tmpfs` isn't persistent. More equivalent option is `overlay-named` but we have reports that [it may be broken in recent kernels](https://github.com/netblue30/firejail/issues/2799).~~
Author
Owner

@rusty-snake commented on GitHub (Jul 2, 2019):

Unlike private-home, overlayfs-tmpfs isn't persistent.

--private-home=file,directory
Build a new user home in a temporary filesystem, and copy the files
and directories in the list in the new home. All modifications are
discarded when the sandbox is closed.

<!-- gh-comment-id:507614953 --> @rusty-snake commented on GitHub (Jul 2, 2019): > Unlike `private-home`, `overlayfs-tmpfs` isn't persistent. > --private-home=file,directory Build a new user home in a temporary filesystem, and copy the files and directories in the list in the new home. **All modifications are discarded when the sandbox is closed.**
Author
Owner

@Vincent43 commented on GitHub (Jul 3, 2019):

@rusty-snake you are right, I confused --private-home= with --private=, the latter one is persistent, sorry.

<!-- gh-comment-id:508053367 --> @Vincent43 commented on GitHub (Jul 3, 2019): @rusty-snake you are right, I confused `--private-home=` with `--private=`, the latter one is persistent, sorry.
Author
Owner

@netblue30 commented on GitHub (Jul 4, 2019):

@maxhaslbeck

Load the latest from mainline and in /etc/firejail/firejail.config set file-copy-limit to whatever you need.
The files get copied in a temporary filesystem in RAM, and if you run out of memory the kernel will start swapping - this is why we put a limit on it.

<!-- gh-comment-id:508532975 --> @netblue30 commented on GitHub (Jul 4, 2019): @maxhaslbeck Load the latest from mainline and in /etc/firejail/firejail.config set file-copy-limit to whatever you need. The files get copied in a temporary filesystem in RAM, and if you run out of memory the kernel will start swapping - this is why we put a limit on it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1767
No description provided.