D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Samba - not the dance

 

On Mon, 17 Sep 2012, Neil Winchurst wrote:

Not so much file transfer as file view. Example, I take photos of my
daughter's horse and place them on a folder on my desktop. Rather than
come into my study, sit at my computer and look at the photos I thought
it should be easy for her to view the relevant folder on her laptop and
look at the photos that way. Perhaps also transfer one or two of the
photos to her laptop. But it all seems very complicated to set up.

NFS is fairly easy.

OK - I've been using it for over 20 years, and I use it every day, however.

On all PCs you need to make sure you have the NFS software installed. In the Debian world:

  sudo apt-get install nfs-kernel-server

will pull it all in for you.

On servers, edit the file /etc/exports - add in lines like this:

  /home *(rw,no_root_squash,sync,no_subtree_check)

that means "export /home and all directories under it, but don't allow remote root access to it".

then

  sudo exportfs -a

(You only need that when you change /etc/exports - it's done at boot time)

On each client PC, edit a line into /etc/fstab:

192.168.2.3:/home /desktop         nfs     
user,noauto,nolock,hard,intr,rsize=1048576,wsize=1048576,proto=tcp,nfsvers=3,fsc 0 0

(That's all one line in-case your email client splits it)

where 192.168.2.3 is the IP address the the "server" and /desktop is a local (empty) directory to mount the drive into. You DO need the 'servers' to have a static IP address on the LAN.

Note the user and noauto parameters above. user will let it be mounted as a user (no sudo/root) and noauto will stop it being mounted at boot time - that's important if the client device is booted off the lan - it will time out eventually, but it will take a long time to do so)

then on the client PC (e.g. laptop) when you want to access the remote directory on the desktop:

  mount /desktop

then /desktop is the /home directory on the 'desktop pc' is visible and will go-away at a reboot.

Thee can be a lot more to it than that - you'll get into lots of issues with premissions, etc. but as long as the files have world read-access then you'll be fine to start with.

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq