can I chown(1) an NFS-mounted file to a user *not* on the NFS server

can I chown(1) an NFS-mounted file to a user *not* on the NFS server

Post by terry433i » Fri, 19 Nov 2004 19:13:58



- I have NFS server (say server_sys) and client (say client_sys) and
mount a directory off NFS server, then create/chmod/chown a file to
users common to both systems
 - then i attempt to chown file to user common *only* to client and
get permissions error...is this because <another_user> is not on NFS
server, this is not a directory perms issue.

# mount -F nfs -o rw,vers=4 server_sys:/export/home/server_dir
/client_dir
# cd /client_dir
# touch client_test_file.tst
# chmod 777 client_test_file.tst
# chown bin client_test_file.tst
# chgrp staff client_test_file.tst
# chown another_user uidmapping.tst
chown: client_test_file.tst: Permission denied
                             ^^^^^^^^^^^^^^^^^
                             why?

 
 
 

can I chown(1) an NFS-mounted file to a user *not* on the NFS server

Post by Mark Danie » Sat, 20 Nov 2004 02:30:36


File ownership information is stored in the inodes on the source NFS
server - therefore the userid must exist on the source server.

Regards,

Mark

 
 
 

can I chown(1) an NFS-mounted file to a user *not* on the NFS server

Post by Peter C. Tribb » Sat, 20 Nov 2004 18:37:50




Quote:> File ownership information is stored in the inodes on the source NFS
> server - therefore the userid must exist on the source server.

Not at all. The ownership is done by numeric userid. It doesn't even
have to exist on the client, let alone the server.

--
-Peter Tribble
MRC Rosalind Franklin Centre for Genomics Research
http://www.rfcgr.mrc.ac.uk/~ptribble/

 
 
 

can I chown(1) an NFS-mounted file to a user *not* on the NFS server

Post by Jonathan Adam » Tue, 23 Nov 2004 17:31:45




> - I have NFS server (say server_sys) and client (say client_sys) and
> mount a directory off NFS server, then create/chmod/chown a file to
> users common to both systems
>  - then i attempt to chown file to user common *only* to client and
> get permissions error...is this because <another_user> is not on NFS
> server, this is not a directory perms issue.

> # mount -F nfs -o rw,vers=4 server_sys:/export/home/server_dir
> /client_dir
> # cd /client_dir
> # touch client_test_file.tst
> # chmod 777 client_test_file.tst
> # chown bin client_test_file.tst
> # chgrp staff client_test_file.tst
> # chown another_user uidmapping.tst
> chown: client_test_file.tst: Permission denied
>                              ^^^^^^^^^^^^^^^^^
>                              why?

This will probably work with NFSv3, but NFSv4 passes the user ID over

configuration), instead of using integer IDs.  If the other side can't
decode that (as it can't in this case), then the action will fail.

(interestingly, if you use a user-id which doesn't exist on the *client*,
then it gets passed over the wire as an integer, and the operation will
succeed)

Cheers,
- jonathan

 
 
 

1. trouble mount nfs share from linux nfs server, protocol not supported

Hi.

I can't mount a nfs share on my NetBSD 1.5.2 client from my linux nfs server.
Is there some special kind of voodoo involved that I'm not aware of ?

mount or mount_nfs command gives following error message: Protocol not supported

I've tried the mount_nfs -2 or -3 and -U or -T options to no avail

The nfs server works OK for other machines on the network (linux clients).

Any ideas?

/u

2. sed question

3. /var/mail: to NFS mount or not to NFS mount?

4. Q: Howto get LED's show CAPSLOCK status?

5. nfs mount problem: mount: can't get address for nfs-server.kauai

6. SuSE 2.2.17 Sound module?

7. logging to NFS-mounted files seems to cause hangs when NFS dies

8. Error can not open /home/xxx/kdehelprc.2

9. linux NFS server problem - can't ls in the NFS mounted directory.

10. NFS backup auto mount on client when NFS server fail...!

11. NFS mount from Linux NFS server

12. Additional nfs mounts on diskless machine lock nfs server

13. NFS Input/output error with linux user space nfs server