Skip to content

Handle VFolder cleanup when contents are owned by custom(per-user) UID/GID #3483

Closed
@fregataa

Description

@fregataa

Motivation

When containers with custom UID/GID write data to VFolders, the created files and directories inherit that custom ownership. This can prevent storage-proxy from properly cleaning up VFolders since it operates with a different user.

Use Storage-watcher

The storage-watcher process runs with root EUID and handles tasks requiring root permissions, such as mount and unmount operations. We propose adding a path deletion API to the storage-watcher and delegating deletion tasks to this process.

Implementation Steps:

  1. Add a delete path API to storage-watcher
  2. Implement a watcher client object in the “vfs” storage backend
  3. Modify the VFolder and directory deletion process with one of these approaches:
    • Option A: Call the watcher's delete path API directly
    • Option B: Attempt deletion using the “vfs” backend's default API first, then fall back to the watcher's delete path API if a permission denied error occurs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions