@Laron Walker For understanding the issue better: Can you please elaborate bit more on your query with the screenshot of the error message?
When using the az webapp config storage-account
command to mount a share to your Python function app, the default behavior is to mount the share as read-only. This is why you encounter the "Read-only file system" error when trying to write files to the mounted share.
To enable write access to the mounted share, you need to explicitly specify the --mount-path
option with the --access-key
and --access-key-type
options when executing the az webapp config storage-account
command.
Here's an example of how you can modify your command to allow write access:
az webapp config storage-account add --name <app_name> --resource-group <resource_group> --custom-id <custom_id> --storage-type AzureFiles --share-name <share_name> --access-key <access_key> --access-key-type StorageAccessKey --mount-path /mnt/<mount_name> --read-write
In your Python code, make sure that you are writing to the correct path within the mounted share. Based on your provided code snippet, it seems like the model_similarity_path
variable should be set to the mount path. For example:
model_similarity_path = '/mnt/<mount_name>/'
Ensure that the <mount_name>
matches the mount path specified in the --mount-path
option when mounting the share.
With these modifications, you should be able to write files to the mounted share without encountering the read-only file system error.