LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2010, 12:59 PM   #1
gorade
LQ Newbie
 
Registered: Nov 2010
Posts: 19

Rep: Reputation: 0
share folders in LAN with only Linux boxes


I have tried to find a simple "how to". People testify how simple sharing over Linux networks is, but I just can't make it.
I have a desktop with Mint LXDB on it. My wife has a laptop with Ubuntu Lucid Lynx connected with a wireless LAN to a D-Link router.

I can open her home-directory with an SSH-command: sftp://sonia@192.168.0.102:10022/home/sonia

But I can't open mine from her laptop. My aim is to connect her to a backup station connected to my computer.

I have been looking into https://help.ubuntu.com/community/SettingUpNFSHowTo. It is six pages long, complicated and i can't make it work.

If networking in Linux should be so simple and native, there must be a better way..I hope.
 
Old 11-01-2010, 01:02 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
You could always just setup a samba share. I've never messed with NFS, but then again, I still have Windows boxes lying around that have to connect.
 
Old 11-01-2010, 01:05 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
There's NFS, Samba, sshfs (which you apparently already tried) ...

Can you give a more detailed description of the process you have
in mind to action the back-ups?

It may be as simple as using rsync ...


Cheers,
Tink
 
1 members found this post helpful.
Old 11-01-2010, 04:05 PM   #4
gorade
LQ Newbie
 
Registered: Nov 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
There's NFS, Samba, sshfs (which you apparently already tried) ...

Can you give a more detailed description of the process you have
in mind to action the back-ups?

It may be as simple as using rsync ...


Cheers,
Tink
rsync or any backup utility would be an alternative when ever I can make contact. From the laptop I can reach the system printer, which is a good thing, but that's all.

I tried with samba but can't make it work either. None of the machines can mount the Samba network. It's too hard for me. I thought Linux would be simpler.

I want to give the backup program an address like sftp://myname@192.168.0.101:10022/media/FreeAgent%2oGoFlex%20Drive/backupfolder to save the backup in

I tried http://www.tldp.org/HOWTO/NFS-HOWTO/server.html. A lot of work but no use. Still I reach the home folder of the laptop, but the laptop can't see anything at the desktop. Sharing options doesn't seem to achieve anything
 
Old 11-01-2010, 05:16 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I still don't know anything about your set-up...

1 computer w/ a big external HDD, one w/o; you want to save
files from both to the external HDD?


Cheers,
Tink
 
Old 11-02-2010, 01:27 AM   #6
gorade
LQ Newbie
 
Registered: Nov 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
I still don't know anything about your set-up...

1 computer w/ a big external HDD, one w/o; you want to save
files from both to the external HDD?


Cheers,
Tink
Exactly. The external HDD is connected by USB 2.0 to my desktop. The router has a USB-contact, but that can't be reached without SharePort which is a MS-only program.

The printer is connected by ethernet cable to the router and is reached via CUPS from both the laptop and the desktop.
 
Old 11-02-2010, 03:13 AM   #7
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Quote:
Originally Posted by gorade View Post
I have tried to find a simple "how to". People testify how simple sharing over Linux networks is, but I just can't make it.
I have a desktop with Mint LXDB on it. My wife has a laptop with Ubuntu Lucid Lynx connected with a wireless LAN to a D-Link router.

I can open her home-directory with an SSH-command: sftp://sonia@192.168.0.102:10022/home/sonia

But I can't open mine from her laptop. My aim is to connect her to a backup station connected to my computer.

I have been looking into https://help.ubuntu.com/community/SettingUpNFSHowTo. It is six pages long, complicated and i can't make it work.

If networking in Linux should be so simple and native, there must be a better way..I hope.
Lets get the setup straight. You have a linux box and your wife has a linux laptop, is that correct? Where does Samba enter the picture? Is there another computer with windows? Is this an external storage device that was formatted in NTFS? If so, why not just reformat it in ext3/4? Then you wouldn't need Samba!

Tom
 
Old 11-02-2010, 07:24 AM   #8
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
well, I wonder what do you mean for _simple_. If you mean "a 1-click solution"... sorry, no chance, you'll have to study "complicated" setups. Or buy some kind of propietary solution. Or do a *looooooong* googling for step-by-step setups.

anyway, IMHO you could try first scp/sftp/sshfs again. Check if you have openssh server installed on your desktop, how it's configured, if it starts OK, if you need to put entries on tcpwrapper files to let you connect, all that stuff. Since you can connect to your wife's laptop, probably your networking part it's OK. And check Mint docs, for Mint-specific things.

or try samba. same thing, check if samba is installed, and check/post its config files
 
Old 11-02-2010, 08:18 AM   #9
gorade
LQ Newbie
 
Registered: Nov 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tommyttt View Post
Lets get the setup straight. You have a linux box and your wife has a linux laptop, is that correct? Where does Samba enter the picture? Is there another computer with windows? Is this an external storage device that was formatted in NTFS? If so, why not just reformat it in ext3/4? Then you wouldn't need Samba!

Tom
Samba came in as I didn't succeed with Linux alone. But, yes, the external storage device is formatted in NTFS. But I can reach it from my box so why couldn't the laptop do that too? Both computers are formatted in ext4.
 
Old 11-02-2010, 08:33 AM   #10
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by gorade View Post
Samba came in as I didn't succeed with Linux alone. But, yes, the external storage device is formatted in NTFS. But I can reach it from my box so why couldn't the laptop do that too? Both computers are formatted in ext4.
perhaps your desktop install has ntfs-3g or ntfs kernel module, and your laptop doesn't. try installing ntfs-3g on your laptop, then plugging the external drive on it.
 
Old 11-02-2010, 09:13 AM   #11
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,832

Rep: Reputation: 259Reputation: 259Reputation: 259
NFS requires the packages:

nfs-common
nfs-kernel-server

You have to setup the firewall on each machine to accept all packets originating from the internal network. Opening the firwall to NFS service does not work, because NFS randomly assigns ports. With two machines you have two IPs to allow, like 192.168.1.100 and 192.168.1.101. But don't do this: 192.168.1.0/24, because that will allow everything from the internet through the firewalls.

After you do that, edit or create /etc/exports on both machines. Here's what a shared folder entry looks like:

# /etc/exports

/home/rebecca/folder 192.168.1.0/255.255.255.0(ro,root_squash,nohide,no_subtree_check,sync)

You can read: man exports for a full list of options, or just use the ones I posted. The entry key is like this:

<folder> <share_with>(options)

To make the NFS share available: exportfs -a exports every share in /etc/exports. You don't need to do that every time, because the boot sequence looks in /etc/exports and runs exportfs if it finds anything.

If you want to share all the time, you can place an entry in /etc/fstab on the other machine:

192.168.1.101:/home/rebecca/folder /mnt/rebeccasmachine nfs rsize=8192,wsize=8192 0 0

You have to make the directory /mnt/rebeccasmachine on your machine. You can make the mount point anywhere, but I always put remote file systems in /mnt.

Or, you can mount a NFS drive like this: mount 192.168.1.101:/home/rebecca/folder /mnt/rebeccasmachine -t nfs

If your wife's name is actually rebecca, don't freak! I only picked the name because it's female gender, and it's sound pretty.
 
Old 11-02-2010, 09:37 AM   #12
DmitrySly
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
gorage,

From my experience, using samba is much simpler than NFS, even between Linux boxes.

Lets try to configure samba step-by-step, and check, where is the problem? The steps are:

1) install samba server (server machine);
2) set up samba user (can be done using GUI) (server machine);
3) make sure that the samba service is running (can be done using GUI) (server machine);
4) open TCP port 445 on the firewall for inbound connections (can be done using GUI) (server machine) ;
5) install cifs/smb filesystem support (client machine);
6) use mount sommand to mount shared folder (client machine).

Which step gets a problem?
 
Old 11-02-2010, 11:17 AM   #13
cojo
Member
 
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
gorage,

are you trying to backup files from your wife laptop to the external drive on your desktop? Or does she need access as a share folder on her laptop? If you just want to use it as backup then you need to use rsync otherwise you can either use NFS or Samba both are very simple to setup and connect to it.
 
Old 11-02-2010, 11:30 AM   #14
gorade
LQ Newbie
 
Registered: Nov 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by AwesomeMachine View Post
NFS requires the packages:

nfs-common
nfs-kernel-server

You have to setup the firewall on each machine to accept all packets originating from the internal network. Opening the firwall to NFS service does not work, because NFS randomly assigns ports. With two machines you have two IPs to allow, like 192.168.1.100 and 192.168.1.101. But don't do this: 192.168.1.0/24, because that will allow everything from the internet through the firewalls.

After you do that, edit or create /etc/exports on both machines. Here's what a shared folder entry looks like:

# /etc/exports

/home/rebecca/folder 192.168.1.0/255.255.255.0(ro,root_squash,nohide,no_subtree_check,sync)

You can read: man exports for a full list of options, or just use the ones I posted. The entry key is like this:

<folder> <share_with>(options)

To make the NFS share available: exportfs -a exports every share in /etc/exports. You don't need to do that every time, because the boot sequence looks in /etc/exports and runs exportfs if it finds anything.

If you want to share all the time, you can place an entry in /etc/fstab on the other machine:

192.168.1.101:/home/rebecca/folder /mnt/rebeccasmachine nfs rsize=8192,wsize=8192 0 0

You have to make the directory /mnt/rebeccasmachine on your machine. You can make the mount point anywhere, but I always put remote file systems in /mnt.

Or, you can mount a NFS drive like this: mount 192.168.1.101:/home/rebecca/folder /mnt/rebeccasmachine -t nfs

If your wife's name is actually rebecca, don't freak! I only picked the name because it's female gender, and it's sound pretty.
Now I have tired to go through all above. Still all is like before. I can easily reach my wifes /home/ folder from my box, but not mine from hers.

From my machine I use a bookmark sftp://192.168.0.102:10021/home/sonia
Thats SSH. That works like from the beginning but nothing else. There must be something essential that I misunderstand.

I am very grateful for your efforts, but it seems I am too stupid for this

Last edited by gorade; 11-02-2010 at 12:00 PM.
 
Old 11-02-2010, 12:04 PM   #15
gorade
LQ Newbie
 
Registered: Nov 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by DmitrySly View Post
gorage,

From my experience, using samba is much simpler than NFS, even between Linux boxes.

Lets try to configure samba step-by-step, and check, where is the problem? The steps are:

1) install samba server (server machine);
2) set up samba user (can be done using GUI) (server machine);
3) make sure that the samba service is running (can be done using GUI) (server machine);
4) open TCP port 445 on the firewall for inbound connections (can be done using GUI) (server machine) ;
5) install cifs/smb filesystem support (client machine);
6) use mount sommand to mount shared folder (client machine).

Which step gets a problem?
I have tried samba too, but neither machine can mount the network. I can't even se my own machine on the ms network
I have tried to follow the instructions from the how to
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
share folders/files on LAN debian/MS computers. ecampii Linux - Networking 2 09-28-2005 09:05 AM
Linux gateway on a LAN and the rest of the boxes are XP MR_UNO Linux - Networking 12 12-02-2004 03:20 AM
Sharing Folders between Linux Boxes JCScoobyRS Linux - Networking 2 03-25-2004 03:41 PM
how to share linux files on LAN btwn other linux boxes shakeeb Linux - Networking 9 02-04-2004 03:10 PM
How to share files,folders and printer on a LAN ? ZhiYi Linux - Networking 2 02-15-2003 07:14 AM


All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration