Troubleshooting EFS Access Denied Error in ECS Fargate and EC2 for Grafana

Hey guys been struggling for a few hours to make EFS work with ECS fargate, tried EC2 as well and I always get the same error: I can’t write to the mounted volume (access denied / operation not permitted). If anyone is kind enough here to help me I can supply more details. I’m trying to add an EFS volume to my grafana on ECS

https://repost.aws/knowledge-center/efs-enable-read-write-access

Yeah I know that article and a bunch of others

Policy looks fine, nfs port opened correctly

I gave it * permissions just to check

I can’t do anything in that mounted volume

Can you read the filesystem though?

even as root I can’t do anything into it

but I noticed there are two errors “permission denied” and “operation not permitted”, the later may come from the nfs client ?

I’m also using an access point

All I can think of is verifying filesystem policy.

also through an ec2 instance created a user with uid 472 and still couldn’t do anything in it

Ec2 instance role and ecs task exec role have * permissions to efs

i’m 100% sure I’m doing something wrong, but I don’t know what, and I’ve tried a whole lot with no avail

Sorry, I have ran out of any ideas :disappointed:

this is just a personal project, as a learning process so I wish I’d have aws support

found what I was doing wrong. So I’m using access point to access the volume. I just left the default path as / for the AP which is a owned by root and won’t be changed

this will create /grafana folder inside the volume and chown + chmod it according to the settings on the right