0

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?

4
  • Please provide the output of id and ls -ln ~/nas.
    – Attie
    Commented Mar 10, 2018 at 11:02
  • Given these permissions, you will need to be nobody, or in the nobody 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)
    – Attie
    Commented Mar 10, 2018 at 11:03
  • Thanks 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?
    – Spacemoose
    Commented Mar 10, 2018 at 11:20
  • that's a new question... superuser.com/questions/272061/…
    – Attie
    Commented Mar 10, 2018 at 11:25

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .