Score:1

Why am I getting "Permission Denied" when trying to write to NFS mount using AWS EC2 EFS mount as server and OSX as client

ng flag

I have a folder like this

$ ls -al /mnt/efs/main/
total 8
drwxr-xr-x. 3 root   root   6144 May 24 02:35 .
drwxr-xr-x. 3 root   root     18 May 23 23:59 ..
drwxrwxrwx. 2 nobody nobody 6144 May 24 03:04 html

I have an nfs server that has an exports like...

/mnt/efs/main/html .../24(rw,no_root_squash) 

but I get

exportfs: /mnt/efs/main/html requires fsid= for NFS export

so I add

/mnt/efs/main/html .../24(rw,no_root_squash,fsid=1)

then run

sudo exportfs -av

and get

exporting .../24:/mnt/efs/main/html

but when I try to mount on the client everything works and the permissions look open...

sudo mount -t nfs -o resvport ...:/mnt/efs/main/html ~/aws-dir
> ls -al aws-dir                                                          
total 8
drwxrwxrwx    2 65534          65534  6144 May 23 23:04 .
drwxr-xr-x+ 198 ....    staff  6336 May 23 23:10 ..

but when I try a touch

~/aws-dir  > touch test
touch: test: Operation not supported

How do I set it up to allow me to write from the client?

Turns out the problem seems to be related to the fact that the file is on an efs mount. Even stranger the file gets created but I can't see it on the drive unless I am on the EC2 machine.

I changed to a normal EBS mount and it worked fine.

de flag
Two questions :a) why fsid 1? Set it to 0, b) areu you are accessing as user root or regular user?
Jackie avatar
ng flag
If I use 0 it won't even let me mount the drive.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.