Showing posts with label Share. Show all posts
Showing posts with label Share. Show all posts

Thursday, May 1, 2008

NFS file sharing

Here's how you share files between two Linux machines, using NFS.

Installation

  • Go to the Synaptic Package Manager
  • Find nfs-kernel-server and install
Configuration in machine 1 (where the shared folder is)
  • Define the shares you want to provide
sudo vi /etc/exports
  • Add your shares to the file
/home/mach1user/Public *(ro,sync)
/home/mach1user/Documents 100.000.00.01(ro,sync)
/home/mach1user/Share 100.000.00.01/20(rw,sync)
  • Make your changes be known
sudo exportfs -a

Configuration in machine 2
(where the shared folder are going to be accessed)
  • Create a folder, where the share will be mounted
mkdir /home/mach2user/HomeNetwork/Public
mkdir /home/mach2user/HomeNetwork/Documents
mkdir /home/mach2user/HomeNetwork/Share
  • Mount the shares (the IP is from machine 1)
sudo mount 100.000.0.05:/home/mach1user/Public /home/mach2user/HomeNetwork/Public
sudo mount 100.000.0.05:/home/mach1user/Documents /home/mach2user/HomeNetwork/Documents
sudo mount 100.000.0.05:/home/mach1user/Share /home/mach2user/HomeNetwork/Share
  • Make the shares available after rebooting
sudo vi /etc/fstab
  • Add to the file (the IP is from machine 1)
100.000.0.05:/home/mach1user/Public /home/mach2user/HomeNetwork/Public nfs ro,hard,intr 0 0
100.000.0.05:/home/mach1user/Documents /home/mach2user/HomeNetwork/Documents nfs ro,hard,intr 0 0
100.000.0.05:/home/mach1user/Share /home/mach2user/HomeNetwork/Share nfs ro,hard,intr 0 0

And that should do it.


Further reading:
last updated: 01-05-2008

Friday, March 21, 2008

Sharing Files with Windows

For sharing files with Windows you just have to follow this steps:

  • Got to System > Administration > Shared Folders
    • in the Shared Folders tab add the folders you wish to share
    • in the General Properties tab type the Workgroup of your Network (as in Windows)
  • In the Terminal add yourself as a Samba user:
sudo smbpasswd -a yourusername

That's it. You can now access your shared folder using you Linux user.


Further reading: