Score:0

mount nfs correctly

us flag

I have purchased a WD-Ex2 NAS and am trying to share a folder via nfs with my ubuntu machine.

This folder will be used only by this machine and I want to be able to have execute permissions with my user. I would like it to be treated as one more home folder.

I am mounting the folder as follows

$ sudo cat /etc/fstab
...
#nfs mycloud
192.168.0.151:/nfs/tmp_msigs60 /media/tmp_msigs60  nfs     defaults,user,relatime,rw,exec    0       0

but I don't have execute permissions and the owner is user # 501 not my user

I have tried mounting with the following options

192.168.0.151:/nfs/tmp_msigs60 /media/tmp_msigs60  nfs     defaults,user,relatime,rw,exec,uid=1000,gid=1000,umask=002    0       0

but when putting uid=1000,gid=1000,umask=002 I get the error:

mount.nfs: an incorrect mount option was specified

Another thing I have tried is to edit /etc/idmapd.conf and change nobody and nogroup for my user, but I have not had any result either

[General]

Verbosity = 0
Pipefs-Directory = /run/rpc_pipefs


[Mapping]
Nobody-User = rodrigo
Nobody-Group = rodrigo

Another thing that I have noticed is that the speed of writing and reading starts with high speed, but it decreases considerably while transferring the file in that folder

David avatar
cn flag
Why NFS? Do you have some special need that requires this?
us flag
I just want to share this folder with Ubuntu and use it as another filesystem folder. According to the internet this fits more to nfs than samba
David avatar
cn flag
Do not know what it is you read I use and most do Samba for that. NFS is a very old and as far as I know much slower protocol for that.
us flag
If you search for nfs vs samba all the results seem to agree that nfs is a bit faster if both systems are linux. On the other hand with samba the permission of the files is a bit strange, the files remain with the permissions that are mounted and I cannot change them, for example all files have execution permission.
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.