Search code examples
azureazure-storageazure-virtual-machineazure-filesazure-container-instances

Azure Container Instance and Azure Storage = permission issue


Iam running gitlab instance in ACI with Azure File Storage mount.

This is output of container:

storage_directory[/var/opt/gitlab/.ssh] (gitlab::gitlab-shell line 38) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/.ssh] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chmod 00700 /var/opt/gitlab/.ssh ----
STDOUT: 
STDERR: chmod: changing permissions of '/var/opt/gitlab/.ssh': Operation not permitted
---- End output of chmod 00700 /var/opt/gitlab/.ssh ----
Ran chmod 00700 /var/opt/gitlab/.ssh returned 1

Is there anything that I have to do to correct permissions on Storage ? I see that some files are created, so problem is explicitly with this... I am using official image from docker hub. I dont want to use custom layer of image with correcting permissions.

Any idea?

Thanks

EDIT: my deployment looks like this: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files#mount-multiple-volumes


Solution

  • Azure Storage Account - File is basically SMB protocol, SA is mounted with root:root 777 permissions. If you need another permissions, You have to use Blob storage.