[GH-ISSUE #839] Conflict with read-only and noexec #568

Closed
opened 2026-05-05 06:10:58 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @valoq on GitHub (Oct 6, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/839

When using read-only together with noexec, the later will override the former.

using a profile with:

read-only ${HOME}
noexec ${HOME}

the path will not be read only and the program can write in the home directory

using noexec and then read-only will lead to the directory being executable.

Originally created by @valoq on GitHub (Oct 6, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/839 When using read-only together with noexec, the later will override the former. using a profile with: read-only ${HOME} noexec ${HOME} the path will not be read only and the program can write in the home directory using noexec and then read-only will lead to the directory being executable.
gitea-mirror 2026-05-05 06:10:58 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@nick75e commented on GitHub (Oct 6, 2016):

Hi!

I think your problem is related to #833.
As for noexec, using noexec ${HOME}/* should solve your issue.

<!-- gh-comment-id:252004044 --> @nick75e commented on GitHub (Oct 6, 2016): Hi! I think your problem is related to #833. As for `noexec`, using `noexec ${HOME}/*` should solve your issue.
Author
Owner

@valoq commented on GitHub (Oct 6, 2016):

It does solve the issue, however it still is not the expected behavior.

The source of the problem seems to be the way fs_rdonly and fs_noexec remount the filesystem with their specific options only, without reapplying the existing options.

<!-- gh-comment-id:252015443 --> @valoq commented on GitHub (Oct 6, 2016): It does solve the issue, however it still is not the expected behavior. The source of the problem seems to be the way fs_rdonly and fs_noexec remount the filesystem with their specific options only, without reapplying the existing options.
Author
Owner

@valoq commented on GitHub (Oct 6, 2016):

One way to solve this might be to get the already applied mount options using something like _PATH_FSTAB (https://www.gnu.org/software/libc/manual/html_node/Mount-Information.html#Mount-Information)
I haven't found any way to remount without overriding the previous mount options.

<!-- gh-comment-id:252037785 --> @valoq commented on GitHub (Oct 6, 2016): One way to solve this might be to get the already applied mount options using something like _PATH_FSTAB (https://www.gnu.org/software/libc/manual/html_node/Mount-Information.html#Mount-Information) I haven't found any way to remount without overriding the previous mount options.
Author
Owner

@chiraag-nataraj commented on GitHub (Oct 6, 2016):

Shouldn't the remount mount option work? https://www.gnu.org/software/libc/manual/html_node/Mount_002dUnmount_002dRemount.html#Mount_002dUnmount_002dRemount

<!-- gh-comment-id:252039163 --> @chiraag-nataraj commented on GitHub (Oct 6, 2016): Shouldn't the `remount` mount option work? https://www.gnu.org/software/libc/manual/html_node/Mount_002dUnmount_002dRemount.html#Mount_002dUnmount_002dRemount
Author
Owner

@netblue30 commented on GitHub (Oct 8, 2016):

Definitely a bug, I'll look into it.

<!-- gh-comment-id:252422419 --> @netblue30 commented on GitHub (Oct 8, 2016): Definitely a bug, I'll look into it.
Author
Owner

@smitsohu commented on GitHub (Oct 21, 2018):

As far as I can tell this is fixed in current Firejail. Please fell free to reopen if you encounter this again.

<!-- gh-comment-id:431671639 --> @smitsohu commented on GitHub (Oct 21, 2018): As far as I can tell this is fixed in current Firejail. Please fell free to reopen if you encounter this again.
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#568
No description provided.