NFS


stale file error

To fix a stale file error you need to

  1. Unmount the share on the client if it isn't already
  2. Restart nfs on the server
  3. Mount the share on the client again

If you did all of that it should work again.

permission problems

So you noticed that suddenly you don't have access to your files and try stuff like chown or ls -la and you can't figure out what's wrong.  
Don't worry I can help you!

A few Ideas:

- Did you recently make a new user? If yes, check with id username if the uid is the same as the one of your user on the server. You could in that case try reseting the permissions of the share by setting the owner to root in ACL.
- More ideas coming if I continue having problems.

How permissions work

The following sections applies to NFSv3

On the server, directories and files have owners and groups ownership. Those ownerships are in reality just unsigned integers. These two values are also referred to as uid and gid.

You are probably wondering what that exactly means, so I am gonna give you two examples.

Imagine that you have a folder on the server that is owned by root user and root group. That means that the uid is 0 and gid is also 0.  On your system you also have have a user and group with the uid and gid of 0. In this example there are no problems since the uid and gid match with an existing user and group.

Now here is an example of a problematic case. Imagine that you have a folder on the server that is owned by yourself. Let's say that that your user on the server has the uid and gid of 1001. But on your PC your user has the uid and gid of 1000. This is a problem, because you won't be the owner on your PC.