What you are doing is NFS share. On a Debian system you should install the tools necessary. Lets assume that the client (the machine on which you want to mount the remote folde) and server (the machine where remote folder is)
On server you'll need to install
apt-get install nfs-server portmap nfs-common
in new debian versions
apt-get install nfs-kernel-server portmap nfs-common
On the client you'll need to install:
apt-get install nfs-client nfs-common
My package selection could have more or less what you need but, some combinations will do.
Now what you need to do is put the folders you want to share with remote machine in /etc/exports:
/path_to_tmp_folder/tmp 192.168.0.2(rw,sync,no_subtree_check,no_root_squash)
Then:
exportfs -ra
/etc/init.d/nfs-kernel-server restart
/etc/init.d/portmap restart
Here 192.168.0.2 is the address of your local machine, replace that with your own IP. exports file has the list of machines that can access the shared folder.
If your machines don't have firewall restrictions to each other (you can solve this by adding host to /etc/hosts.allow).
Now on your local machine you can use the command:
sudo mount -o soft,intr,rsize=8192,wsize=8192 server_ip:/path_to_tmp_folder/tmp /local_path_to_empty_tmp_folder/tmp
If you want to have automatic mount on boot you need to edit your /etc/fstab file and put the line on your client:
server_ip:/path_to_tmp/tmp /local_empty_folder/tmp nfs rsize=16384,wsize=16384,rw,auto,nolock
This is just an example of settings (copy pased from my own), you need to check nfs help to see what suites you best.
1Why was this migrated from SF? – Ignacio Vazquez-Abrams – 2011-06-22T14:42:09.097
@Ignacio Well - the OP most probably is no sysadmin. David, I assumed you have Debian. Correct me if I'm wrong. Anyway, there is no Linux 5.1. – slhck – 2011-06-22T14:44:42.777
@Ignacio There's nothing about this that indicates managing desktops or servers in a professional capacity, so based upon the SF FAQ it doesn't belong on SF. – Darth Android – 2011-06-22T14:45:40.123
1@slhck, @Darth: If you insist. – Ignacio Vazquez-Abrams – 2011-06-22T14:48:08.860
1@David: Please post
/etc/exports
and the output ofnetstat -plant
andiptables -L
from the server. – Ignacio Vazquez-Abrams – 2011-06-22T14:48:46.3301@David: have you started an NFS server on the server machine? Is iptables running on the server? – Peltier – 2011-06-22T14:50:07.740