1

There are two machines: "A" and "B". OS is SLES 9.4. "A" is the NFS server, "B" is the NFS client. "A" has exported an FS to "B". "B" mounted the NFS share. On both machines I have root permission. There is an "XY" user on the NFS client: "B". The mounted NFS looks like this on "B":

SERVER:/foo # ls -la /foo/ total 28 drwxr-xr-x 4 bar admin 4096 Dec 18 07:35 . drwxr-xr-x 34 root root 4096 Dec 17 10:20 .. drwxrwxr-x 7 bar admin 4096 Dec 15 03:03 zzz drwx------ 2 root root 16384 Dec 2 2013 lost+found SERVER:/foo # 

The "bar" user isn't "XY" user and I can't add it to the "admin" group.

My question: How can I give the "XY" user full write permission to the /foo/ on the NFS client, "B"? with ACL's? How?

UPDATE: I just found out ACL's doesn't work via NFS :D

UPDATE#2: no, modifying the permissions on the /foo isn't good, because the /foo is used on "A".

2 Answers 2

3

Users on NFS servers and clients are recognized by their numeric ids, not their names (unless you have some mapping service or alike). If you use the same numeric id for different usernames on different machines, file permissions will look strange and may not work as expected. To fix your problem, the following steps should work:

  1. Ensure that user XY exists both on machines A and B and has the same numeric id. It may be necessary to do the same for group ids, too.
  2. Ensure that XY as the desired access rights on the server to access /foo
  3. Permissions as set on the server should appear on the client. Umount/mount if it doesn't. If it still doesn't, this solution did not work.
0
setfacl –m u:XY:rw /foo/ 

or

chown XY /foo/ 

This can be used to give read-write permission to the user XY for directory /foo/ . Chown gives rwx permission on that directory.

For more related studies Click here

3
  • 2
    I just found out ACL's doesn't work via NFS :D Commented Dec 19, 2013 at 8:52
  • Chown works good, I've tested. See my updated answer. Commented Dec 19, 2013 at 9:06
  • Chown change the owner of the file, it does not change permission. Commented Dec 13, 2016 at 12:32

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.