title: Linux mount NFS with specific user
body: <p>I was searching hours on the Internet, but for this specific problem I could not find any solution.</p>
  
  <p>1: I have a Xubuntu Linux on my PC. I use it in average way: browse the Internet, watch videos, etc. And also it gives home for my PHPStorm app but no the project files. This is the  HOST. It has a host-only network: <code>192.168.56.1</code></p>
  
  <p>2: I have a VirtualBox Debian Linux (no GUI) system. This meant to be represent a development version of my real webserver. It has all the project files. This VM is on an external drive, so I can take it everywhere (e.g.: to the office). <code>192.168.56.101</code>. This is the GUEST.</p>
  
  <p>3: on the HOST I use dnsmasq to force every *.dev domain to be redirected to the GUEST. So I can test my projects easily. </p>
  
  <p>4: on the GUEST I exported the <code>/var/www</code> folder in the <code>/etc/exports</code>:</p>
  
  <pre><code>/var/www 192.168.56.1(rw,sync,no_root_squash,no_subtree_check)
  </code></pre>
  
  <p><strong>The problem:</strong> I want to use the PHPStorm on the HOST to edit the files on the GUEST "locally". But I cannot mount the GUEST's <code>/var/www</code> folder into the HOST's <code>/home/gabor/Projects</code> folder with full permissions. I tried to use the following:</p>
  
  <pre><code>$&gt; sudo mount 192.168.56.101:/var/www /home/gabor/Projects
  </code></pre>
  
  <p>This looks okay for the first time, but the folder is mounted with <code>nobody:nogoup</code> and I have no permissions to edit.</p>
  
  <p>I want the <code>/home/gabor/Projects</code> has the owner <code>gabor:gabor</code> and everything I create in this folder must has the owner <code>www-data:www-data</code> on the Debian side. But for NFS mounting I cannot specify the user.</p>
  
  <pre><code>$&gt; sudo mount -o umask=0022,gid=1000,uid=1000 192.168.56.101:/var/www /home/gabor/Projects
  mount.nfs: an incorrect mount option was specified
  </code></pre>
  
  <p>I also failed to <code>mount --bind</code> the <code>/var/www</code> with different user (should be <code>nobody:nogroup</code>) on the Debian, so that I could export that one...</p>
  
  <p>How can I solve this problem? 
  Please help me.
  Thank you.</p>