File with exec perms is not executable on OpenShift persistent volume on GlusterFS

Solution Verified - Updated -

Issue

When mounting the glusterfs storage to OpenShift's pod, the executable files are not executable due to the selinux policy issues. It will result in 'Permissions Denied' even if the '+x' permissions are set to the file.

# oc rsh pod_mount-1-4rshd

sh-4.2$ ls -lZ /mount/glusterfs/binary
-rwxr-xr-x. 1001 root system_u:object_r:fusefs_t:s0    /mount/glusterfs/binary

sh-4.2$ /mount/glusterfs/binary
sh: /mount/glusterfs/binary: Permission denied

Environment

OpenShift Container Platform 3.3
OpenShift Container Platform 3.4
OpenShift Container Platform 3.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.