Results 1 to 2 of 2

Thread: Can write to NFS share as normal user... but not as root!

  1. #1
    Join Date
    Jun 2005
    Beans
    122

    Can write to NFS share as normal user... but not as root!

    My desktop has /home setup as an NFS share. On my laptop, I'm logged in as root (recovery console). I successfully mount my desktop's share and can see files with ls. But I can't write any files! I happen to use the same username/pass on both my desktop and laptop. On the laptop, if I su to my normal username, and then try to write to files on the share, it works! As it so happens, I need to run a command as root on my laptop that will be writing to the NFS share. Thus the problem: I can only run the command I need if I'm root, but the command will only work without a permissions error if I'm not. I tried being the normal user and using sudo, but I had the same problem.

    I suspect I misunderstand how NFS is supposed to work, but at this point this behavior just seems bizarre O_o Any ideas?

  2. #2
    Join Date
    Dec 2004
    Beans
    77
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can write to NFS share as normal user... but not as root!

    It is how it is supposed to work. By default, on your nfs server, file systems are exported with root_squash option, which means that root on any nfs client is mapped to user nobody on server. It is a security measure, since nfsv3 (unlike nfsv4) is pretty insecure, unless used on secured network, and tightly controlled clients. If you wish that root on client is mapped to root on server, put no_root_squash in your exports file on nfs server. Check man exports.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •