azure-filesazure-container-apps

Azure Container App Jobs: Accessing Azure Files fails with mount error(13): Permission denied


I am trying to write data to an Azure Files share from an Azure Container App Job.

What I have done:

  1. I have created the share

  2. I have added it to my Container App Environment under the tab Azure Files (Using storage account key1)

  3. I have added the share to the Volumes section of my Container App Job

  4. I have added the volume to the container.

Yet when I start the Container App Job it errors out with this message:

Container 'container' was terminated with exit code '' and reason 'VolumeMountFailure'. One or more errors occurred. (Shell command exited with non-zero status code. StatusCode = 32 | StdOut =  | StdErr = mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
) (Shell command exited with non-zero status code. StatusCode = 32 | StdOut =  | StdErr = mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
)

Base image for container container is python:3.12-alpine3.19 (kernel 6.6). Can anybody see what I am doing wrong or is this simply not supported?

The share in Azure Files

Container App Environment

Container App Job

Container


Solution

  • In my case the issue was that Azure Container Apps Environment can't connect to a Storage Account if Maximum Security is set up:

    This does not work:

    enter image description here

    What worked was the following custom setup:

    SMB protocol versions SMB3.1.1;
    SMB channel encryption AES-128-GCM;AES-256-GCM;
    Authentication mechanisms NTLMv2;
    Kerberos ticket encryption -