Score:0

R/W Permission Kubernetes over NFS

cn flag

I have kubernetes pod with a PHP & Nginx containers , mounting an NFS share v4.1, as /var/www/html/"webcontent" When I access the application from browser throws the error "You need to grant write permissions for PHP on the following directory: /var/www/html" The NFS server is a Sinology NAS, no mapping enabled, so it should default to use UID=33 GID=33 . Both are synced in the NFS server and everywhere on the cluster If i try to get in the container with kubectl exec -it nginx-phpfpm /bin/bash , I can see both the owner and and groups, as www-data, all permissions result granted as in : Inside Container as root : Permission and ownership

Inside Conainer as root : Folder Permission and ownership

All permissions looks granted, but still i am unable to run the application : Prestashop

Now, all is left looks pointing to the way the container mounts the NFS share, The application (Prestashop) can't be at fault since i tried, works with block storage.

May this have to do with the Pod's security context ? PV PVC

Any additional information will be provided,

Score:0
br flag

I am thinking the problem could be related to fsgroup permission.

(1) Check the readOnly settings in Volume mount

(2) Check the securityContexts (fsgroup), Does the PHP user belong to the same UID(33) and Group ID(33)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.