proot icon indicating copy to clipboard operation
proot copied to clipboard

-S or -0 -R do not work to install programs

Open CicadaSeventeen opened this issue 2 years ago • 2 comments

Expected Behavior

Use proot -S or proot -0 -R to install apps in container.

Actual Behavior

Both apt and zypper do not work. apt cannot unlock, and zypper fails to read from .run

After running Step * , it is possible to use apt and zypper but many other programs breaks for they need to be in less permission.

Steps to Reproduce the Problem

  1. rysnc -aAxXH / /tem to make a copy of OS
  2. proot -S /tem

( *. sudo chmod -R 4755 /tem)

Specifications

  • Proot/Care version: 5.30
  • Kernel version: 5.3
  • Host distribution: openSUSE leap 15.3
  • Guest distribution: openSUSE leap 15.3 (and Debian 11 also tested)

CicadaSeventeen avatar Jan 07 '22 23:01 CicadaSeventeen

One specific problem I encountered when trying to make apt work under proot:

A process running under proot -0 sees files owned by the unprivileged user running proot as owned by root. However it does not do similar mapping for other system users or groups.

For example, apt likes to have /var/lib/apt/lists/partial owned by system user _apt. This then leads to various permission denied errors, because the unprivileged user running proot does not have permission to work with files owned by _apt.

avian2 avatar Jan 17 '23 09:01 avian2

I've created a tool to handle this here.

ruanformigoni avatar Feb 26 '23 21:02 ruanformigoni