On 2026/1/14 16:35, Yifan Zhao wrote:
In rebuild mode, the {u,g}id of the root inode is currently defaulted
to 0 and is not controlled by --force_{u,g}id. This behavior also causes
the {u,g}id of intermediate dir inodes created by
`erofs_rebuild_mkdir()` to be set to 0.
This patch fixes the behavior by explicitly setting permissions for the
root inode:
- If --force-{u,g}id is not specified, it now defaults to the current
user's {u,g}id.
- If --force-{u,g}id is specified, it correctly updates the ownership
for all files and directories.
Signed-off-by: Yifan Zhao <[email protected]>
Applied now.