darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.42k stars 442 forks source link

A read-only lowerdir for the overlayfs causes permission issues #1547

Open Frontear opened 2 hours ago

Frontear commented 2 hours ago

Expected Result Running darling shell compiled with a custom, read-only lowerdir=<path> should function correctly.

Actual Result Paths from the lowerdir are brought up as read-only, making any commands that write to the filesystem fail with "Permission denied".

Steps To Reproduce

  1. Compile darling with a custom directory specified at build-time
  2. Attempt to run darling shell, then xcode-select --install
  3. Permission Denied

System Information NixOS 24.11 (I have confirmed this issue is possible on Arch Linux as well)

Software Version
Linux Kernel 6.6.53
Darling 25afbc76428c39c3909e9efcf5caef1140425211
Frontear commented 2 hours ago

Internally it seems I also cannot call chmod +w on anything, probably due to the lowerdir itself being mounted as read-only.

This behaviour is inconsistent, suddenly I am able to run the aforementioned command. Nonetheless this is definitely a bit inconvenient.

EDIT: Furthermore, even after exhaustively setting the write bit, xcode-select --install can still fail with "Permission denied", so obviously its not exhaustive enough. Only makes this a further problem for usability.