Skip to content

Changing ownership of s3fs volume mount point #50

Open
@pres-t

Description

@pres-t

Hi,

I have an application container running as a non root user (uid=111111,gid=111111) with an s3fs volume provisioned through a volume claim template.
The issue i'm facing is that when the volume is mounted, the mount point ownership is root and the application cannot write to the volume.
The container spec has
securityContext: runAsUser: 11111

I've tried following the steps described at https://cloud.ibm.com/docs/containers?topic=containers-cs_troubleshoot_storage#cos_nonroot_access but in my case i've added an initcontainer to perform the job of the fix-permissions.yaml, however that did not resolve the problem.

Also I've noticed that the flexVolume driver has the options for:
"kubernetes.io/fsGroup,omitempty"
"kubernetes.io/mounterArgs.FsGroup,omitempty"
based on https://github.com/IBM/ibmcloud-object-storage-plugin/blob/master/driver/driver.go#L75
How are these options passed to the driver?

k8s nodes version - 1.16.7
object storage plugin version - 1.8.16

Any help would be appreciated.
Thanks

Metadata

Metadata

Assignees

No one assigned

    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