Unable to write to mounted nfs directory
Given these permissions, you will need to be nobody
, or in the nobody
group to write to this directory. So your venture down that path was correct.
You'll need to restart your session after modifying the user's groups, as these are not dynamic.
This question offers some solutions to this problem: Reload a Linux user's group assignments without logging out. Note, however, that these solutions typically involve creating a new temporary session, and in a desktop environment, rebooting may be the best option.
Related videos on Youtube
Spacemoose
Updated on September 18, 2022Comments
-
Spacemoose over 1 year
I don't really know what I'm doing here, so I apologize for any lack of clarity or precision.
I have a Fedora 27 workstation and server. The server is configured to share a folder called
/home/nfs
on the NFS server. This server was previously running an older version of NFS, and now I believe I am using NFSv4 by default. Since the upgrade, I am unable to write to the NFS share mounted on~/nas
Here is all the relevant information I can think of. I haven't payed any attention to user-id's, so they are all automatically generated.
# exportfs -v outputs: /home/nfs <world>(rw,sync,wdelay,hide,no_subtree_check,fsid=0,sec=sys,secure,no_root_squash,no_all_squash) # The permissions of the mount folder: drwxrwxr-x. 18 nobody nobody 4096 Mar 8 20:09 nas # Try to 'touch ~/nas': touch: setting times of '/home/stg/nas': Permission denied # Try to touch ~/nas/t touch: cannot touch '/home/stg/nas/t': Permission denied # reading files works fine. # sudo lets me write to files. # cat /proc/mounts: hal:/ /home/stg/nas nfs4 rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,time # on the server side, 'ls -ll /home/' gives: drwxrwxr-x. 18 nobody nobody 4096 Mar 10 11:38 nfs
I can make the folder writeable by running
chmod o+w nfs
on the server, but that seems like the wrong thing to do -- under NFSv3 the existing permissions worked. I tried adding the client-user to group nobody (which seems wierd) but to no effect.Can someone explain to me what I'm doing wrong?
-
Attie about 6 yearsPlease provide the output of
id
andls -ln ~/nas
. -
Attie about 6 yearsGiven these permissions, you will need to be
nobody
, or in thenobody
group, so that attempt was correct - did you start a new session after adding yourself to that group? (group changes don't take effect in active sessions) -
Spacemoose about 6 yearsThanks for the tips guys.
id
showed the user wasn't yet in the nobody group, even though the entry was in/group
. I started a new terminal, problem persisted. I logged out of the gnome session and started a new one, problem persisted. I rebooted, and now I'm OK -- what can I do next time short of rebooting? -
Attie about 6 yearsthat's a new question... superuser.com/questions/272061/…
-