How can I set permissions for mounted azure fileshare?

Viewed 374

I want to deploy NextCloud on Azure Container Instances. I was able to set up the container group using Azure CLI like this:

az container create 
  --resource-group NextCloud 
  --name nextcloudcontainer 
  --image nextcloud 
  --dns-name-label somelabel
  --ports 80 443 
  --azure-file-volume-account-name myaccountname
  --azure-file-volume-account-key myaccountkey 
  --azure-file-volume-share-name nextcloudfs 
  --azure-file-volume-mount-path /var/lib/nextcloud/ 
  --os-type Linux 
  --cpu 1 
  --memory 2 
  --location germanywestcentral 
  --restart-policy OnFailure

Problem is, that the drive /var/lib/nextcloud/ is mounted with permissions 777, but for nextcloud I require 770. This cannot be changed with chmod afterwards, but only at deployment time. How could this be achieved?

I saw this post, but I do not understand, how this could be done as with restart of the container, I would have to do this manually every time.

1 Answers

There is a way to change permission in Azure Files at mount time with mount param filemode and dirmode. However in ACI, we don't have that flexibility in ACI to change the param. We are aware of this request and working on it.

Related