From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id D266E1FF136 for ; Mon, 23 Feb 2026 14:06:29 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DF251B6A8; Mon, 23 Feb 2026 14:07:20 +0100 (CET) From: Filip Schauer To: pve-devel@lists.proxmox.com Subject: [PATCH common/container/manager 0/8] implement per-mountpoint uid/gid mapping Date: Mon, 23 Feb 2026 14:04:46 +0100 Message-ID: <20260223130706.90972-1-f.schauer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1771852020041 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.067 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.798 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.79 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.547 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4AGP5DVILWWKAZIGTHGNITEAQTI725W6 X-Message-ID-Hash: 4AGP5DVILWWKAZIGTHGNITEAQTI725W6 X-MailFrom: f.schauer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add support for configuring UID/GID mappings on individual container mount points without affecting the global container mapping. A new "idmap" mount point option accepts space-separated mappings: ``` idmap=type:ct:host:len type:ct:host:len ... ``` type: can be either 'u' or 'g' ct: ID as seen inside the container host: corresponding ID on the host len: number of consecutive IDs to map Unmapped ranges inherit the container's ID mapping. Example to pass through the host UID & GID 1005: ``` mp0: /mnt/data,mp=/data,idmap=u:1005:1005:1 g:1005:1005:1 ``` This allows, for example, passing through a directory owned by a specific user on the host to a specific user inside the container, without changing the ownership on the host or configuring an ID mapping for the entire container. Build/Bump order: * pve-common * pve-container * pve-manager pve-common: Filip Schauer (3): tools: export O_CLOEXEC constant syscall: add missing mount attribute constants tools: add mount_setattr syscall src/PVE/Syscall.pm | 3 +++ src/PVE/Tools.pm | 10 ++++++++++ 2 files changed, 13 insertions(+) pve-container: Filip Schauer (4): namespaces: relax prototype of run_in_userns namespaces: refactor run_in_userns namespaces: add helper to create user namespace from idmap implement per-mountpoint uid/gid mapping src/PVE/LXC.pm | 85 ++++++++++++++++++++++++++++++++++++++- src/PVE/LXC/Config.pm | 7 ++++ src/PVE/LXC/Namespaces.pm | 63 ++++++++++++++++++++++++----- src/lxc-pve-prestart-hook | 14 +++++++ 4 files changed, 157 insertions(+), 12 deletions(-) pve-manager: Filip Schauer (1): ui: lxc/MPEdit: add "idmap" option www/manager6/lxc/MPEdit.js | 203 +++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) Summary over all repositories: 7 files changed, 373 insertions(+), 12 deletions(-) -- Generated by git-murpp 0.6.0