Open muhamadazmy opened 4 years ago
IMO, for sure, we have to keep UID and GID inside flist. I think it's better to keep mapped user/group for extended purpose and add UID and GID field on the ACL.
If the UID/GID is available, 0-fs directly forward this information and doesn't query anything on the host, this will fix lot of issues. If not available, fallback to username/groupname.
The problem is that ACL uses "usernames"/"groupnames" not uid or gid. Then 0-fs lookup the system
the host system
for the valid UID.The problem now this mapping won't work for a container, imagine a container that has user "john" in its /etc/passwd that maps to UID 1000. But on the system there is no user john altogether . In that case 0-fs will assign UID 0 to the file, hence it will be owned by the root instead (inside the container)
The right way to do it is that the flist should preserve UID/GID instead of names (may be also keep name lookup but only use it if ids are not set)
Once the UID/GID are preserved the container will show the right name from its /etc/passwd file.