Getting Permission denied error when copy files from mysql pod using azure file

Prashanth Kumar 1 Reputation point
2022-01-18T11:17:57.6+00:00

Hi,
I have a MySQL pod deployed using the default azurefile storage class and the pod comes up fine with this. Now i logged in to the node where the pod was running and tried to copy the data from the mounted path, gives me Permission Denied error as follows

root@aks-nodepool1-34339388-vmss000000:/host/var/lib/kubelet/pods/b28f3252-1444-4eba-aeb5-055f4374404a/volumes/kubernetes.io~csi
/pvc-a1458ad2-3536-46e4-b30b-cf822e616b1c/mount# ls -lrth
total 109M
drwxrwxrwx 2 root root   0 Jan 18 08:29 mysql
-rwxrwxrwx 1 root root 48M Jan 18 08:29 ib_logfile1
drwxrwxrwx 2 root root   0 Jan 18 08:29 performance_schema
-rwxrwxrwx 1 root root  56 Jan 18 08:30 auto.cnf
-rwxrwxrwx 1 root root 12M Jan 18 08:30 ibdata1
-rwxrwxrwx 1 root root 48M Jan 18 08:30 ib_logfile0

root@aks-nodepool1-34339388-vmss000000:/host/var/lib/kubelet/pods/b28f3252-1444-4eba-aeb5-055f4374404a/volumes/kubernetes.io~csi
/pvc-a1458ad2-3536-46e4-b30b-cf822e616b1c/mount# cp ib_logfile0 ..
cp: error reading 'ib_logfile0': Permission denied

I did Google and found a few solutions related to Azure File share which I am not using but I am assuming this is not really needed.
I am wondering how did the MySql Pod come up fine but accessing the same file using the cp command is failing. Am i missing something?

-Prashanth

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,420 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prashanth Kumar 1 Reputation point
    2022-01-26T04:19:49.157+00:00

    Hi,
    Any update on this?

    -prashanth


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.