LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-03-2011, 04:37 PM   #1
philvd
LQ Newbie
 
Registered: Jun 2011
Posts: 2

Rep: Reputation: Disabled
Sharing a folder on the network


It is probably a very easy question, but I could not find the right answer on the net so far. What I am trying to do is to set up a network of machines running Ubuntu 11.04. On of these machines will have a folder that needs to be shared with all the other machines. Eventually, this folder should be mounted at startup on the machines that are accessing over the network.

So, what I tried to do was:
sudo mount 192.168.37.202:/home/user1/dir1 /home/user2/dir2 -o username=user1,password=password1

dir1 is the folder on machine 192.168.37.202 that should be shared. This is the response that I get:

mount.nfs: an incorrect mount option was specified

So, what am I doing wrong? Do I have to install anything special?

As I said before, eventually I want to have an automatic mount, so I guess that I have to edit /etc/fstab. What does this entry should look like?

Thanks!
 
Old 06-03-2011, 04:44 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Welcome to LQ!!!

Syntax for mount should look like this:

Code:
sudo mount -t nfs 192.168.37.202:/home/user1/dir1 /home/user2/dir2
Not sure why you are using -o user name and password because if you are sharing via nfs then it should not require a password I guess unless you have done some specified settings.

Also if you want to mount using fstab then you can add up the above line as below in /etc/fstab:

Code:
192.168.37.202:/home/user1/dir1   /home/user1/dir2   nfs    rsize=8192,wsize=8192,timeo=14,intr
Make sure you take a backup of /etc/fstab before making any changes. It is always good to take backup of important configuration files before you make any changes to it.
 
Old 06-03-2011, 05:05 PM   #3
philvd
LQ Newbie
 
Registered: Jun 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi,
Thanks for the quick reply. This is what happens if I try your suggestion:

sudo mount -v -t nfs 192.168.37.202:/home/user1/dir1 /home/user2/dir2
mount.nfs: timeout set for Fri Jun 3 15:03:58 2011
mount.nfs: trying text-based options 'vers=4,addr=192.168.37.202,clientaddr=192.168.37.205'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'vers=4,addr=192.168.37.202,clientaddr=192.168.37.205'

ANy further ideas what goes wrong? Thanks a lot!
 
Old 06-03-2011, 05:54 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

1. Check if nfs is allowed to pass through firewall on the destination machine (machine you are trying to contact for nfs share)
2. Check if nfs is loaded properly on the destination machine.
3. See if you have got exports configured in /etc/exports on destination machine (machine you are trying to contact for nfs share)
4. Is selinux running on this system? If yes, then let us know the output of getsebool -a | grep nfs
 
  


Reply



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
Sharing folder with Windows network 512upload Ubuntu 32 02-06-2011 03:59 PM
Network sharing folder cheesewizz Linux - Networking 4 05-27-2009 12:08 PM
create a home network file sharing folder driftboy Linux - Newbie 1 11-19-2007 10:34 AM
Sharing a folder between two network computers reverse Debian 2 08-14-2007 11:05 AM
window xp sharing folder on a network blackzone General 1 09-10-2006 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 PM.

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
Open Source Consulting | Domain Registration