NFS troubles

Oliver Fromme olli at lurza.secnetix.de
Wed Jun 15 09:47:49 GMT 2005


Timur Nasyrov <itabox at yandex.ru> wrote:
 > I’m trying to establish NFS communication between two FreeBSD boxes
 > (5.3 Release and 4.10 Release). After mounting shared resource I try
 > to copy some data into nfs-mounted point.  
 > 
 > And one strange thing is noticed – my files on the nfs-mounted folder
 > have as owner "-2" but as group have "wheel". When I trying to use a
 > file manager (Midnight Commander) to copy data from local drive to
 > nfs-mounted point I receive an error-message: "Cannot chown target
 > file "file_name" Operation not permitted". Even though the file itself
 > is copied with "-2:wheel" UID/GID.

You're probably trying to copy the files as root.
By default, root is mapped to UID -2 ("nobody") when
accessing an NFS server.  This is done for security
reasons.

To map root to a different user (e.g. to root itself
on the NFS server), user the "-maproot=..." option in
your /etc/exports file.  However, be sure to know what
you're doing and what the security implications might
be.  See the exports(5) manpage for details.  

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"C is quirky, flawed, and an enormous success."
        -- Dennis M. Ritchie.


More information about the freebsd-fs mailing list