Apply per-user uid/gid for uploaded files and vfolders created by Storage Proxy
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Motivation
- Just like [https://lablup.atlassian.net/browse/BA-3164](https://lablup.atlassian.net/browse/BA-3164), changing the owner uid of the new files/dirs and vfolder itself to the owner user’s `container_uid` will allow additional metadata manipulation by the user.
## Required Features
- Along with the “root” privileged sub-service of Storage Proxy, run `chown` to set the `container_uid` and `container_gid` of the requesting user after doing filesystem operations and creating vfolders within Storage Proxy.
- We need to pass the values of `container_uid`, `container_gid` to the client-facing APIs of Storage Proxy (for file uploads) and the manager-facing APIs of Storage Proxy for Manager to Storage Proxy RPCs.
## Testing Scenarios
- Configure the [Backend.AI](http://Backend.AI) cluster to use per-user uid/gid, by setting `container_uid` and `container_gid` fields of a user.
- Create a vfolder and upload files via the Web UI as the user.
- Create a new interactive session mounting the vfolder.
- Open a terminal in the session.
- Check the output of `ls -l` against the vfolder. The vfolder itself and its contents should have the same uid/gid of the `work` user of the container.
- Check if changing the permission, the gid for the files inside the vfolder by the `work` user in the container succeeds.
JIRA Issue: BA-3165
Contributor guide
Assessment
This issue has not been assessed yet.