linuxserver / docker-openvscode-server

GNU General Public License v3.0
110 stars 16 forks source link

[BUG] Changes owner of mounted volume to the /config #29

Closed isumix closed 4 months ago

isumix commented 4 months ago

Is there an existing issue for this?

Current Behavior

Currently shown in the example to mount into container's /config But this will chown -R anything mountend into this directory with the PUID:PGID

Expected Behavior

Either rewrite docs (README) recommending other location and warning about this behavior. Or fix this behavior. Mounted files` permissions must not be changed.

Steps To Reproduce

As a normal user (not root), run the command below, mounted folder will be chown-ed

Environment

- OS: Debian 12.5
- How docker service was installed: apt-get install podman

CPU architecture

x86-64

Docker creation

podman run -d \
  `# Mounting anything within /config will chown -R` \
  -v "${HOME}/Projects:/config/Projects" \
  "docker.io/linuxserver/openvscode-server:1.90.1"

Container logs

usual
j0nnymoe commented 4 months ago

This isn't a bug. The container expects to have control over the /config and set it to the PUID/PGID provided otherwise it sets to 911 for both.

aptalca commented 4 months ago
  1. As J0nnymoe stated, /config is the container's folder and the container manages its permissions.
  2. /config/workspace is where the container expects the project files and that folder is excluded from permission fixing
  3. We expect the user to map the /config folder, not some random subfolder to it