darlinghq / darling

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

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

Open Frontear opened 1 month ago

Frontear commented 1 month 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 1 month ago

Despite attempting to recursively add the write bit, it will still error out at random locations with Permission denied. The only fix is to either have a read-write lowerdir, or run darling shell as root (as in literally sudo darling shell), the latter being an extremely bad idea for many reasons.