LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-25-2007, 05:22 AM   #1
gpragati
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
Post sharing of files and folders


hi,

I want to share my files and folders in the network. How to share the files and folders in Linux?

Please help.

Thank You.
Pragati.
 
Old 08-25-2007, 05:37 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679
You are not revealing much about your network. There are two main networking technologies in linux, NFS and Samba. You might use NFS to mount a remote directory when all of the computers are running Unix or Linux. If you want to share files between a linux computer and a windows computer, then install Samba.

You distro (you didn't mention which one you are using) may have a GUI samba configuration program. You can also use "swat" to configure samba via your web browser.

Or you can manually edit your /etc/samba/smb.conf file.

Either the samba package or a samba-doc package will provide 3 Samba 3 books, including "Samba 3 by Example". One of the sample configurations may be what you want.

Last edited by jschiwal; 08-25-2007 at 05:40 AM.
 
Old 08-26-2007, 11:08 AM   #3
Chaitannya
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Rep: Reputation: 0
Even i am facing the same problem

Hello,

Even i am facing the same problem.
Can anyone tell me the procedure from scratch. I am using centos. I have setup DHCP and it is working fine. I have tried pinging from both the computers (Client and server), and everything is working fine. Now i have tried with commands like

/etc/init.d/nfs start

the services got started, but what next, how do i start accessing the files when through NFS. I have figured out that i have to use NFS for sharing the files. So i have enabled sharing in the permissions. Also in the sharing tab i have enabled NFS sharing. Once done with that the icon of the folder showed a plug indicating it is shared. But now what next, how to i access that folder from a different machine.
Can anyone explain me the process ffrom the scratch, keeping in mind that i am newbie. Thanks in advance

Last edited by Chaitannya; 08-26-2007 at 11:09 AM.
 
Old 08-26-2007, 12:38 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679
Normally you would define exports in /etc/exports and you would either use the mount command or include an entry in /etc/fstab to mount a remote nfs directory.

See the manpage for exports.

Suppose your network is called "chiatnet" and your username is "chiatannya". On the first computer hostname "chia", You can export your personal documents folder by adding:
/home/chiatannya/Documents *.chiatnet(rw,map_identity)

to the /etc/exports file. Now at another Linux or unix machine, you could run:
sudo mkdir /mnt/chiatdocs
sudo mount -t nfs chiat:/home/chiatannya/Documents /mnt/chiatdocs

The first command creates a mount point. The second mounts the nfs share (a directory on the "chia" computer) on /mnt/chiatdocs.

You may also be able to open the nfs share in your file browser, and it may be mounted for you under the /media/ directory.
 
Old 08-26-2007, 02:26 PM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 57
http://www.linuxquestions.org/questi...d.php?t=579024
 
Old 08-26-2007, 05:59 PM   #6
WAJEDUR REHMAN
Member
 
Registered: Aug 2007
Posts: 43

Rep: Reputation: 15
http://www.linuxhomenetworking.com
check for SAMBA or NFS
 
Old 08-28-2007, 05:21 AM   #7
gpragati
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs down regarding sharing of files and folders

hi,

first of all, thanx for helping me.

i have started NFS service on my Linux PC and i understand that service.
but what next how can i create NFS share? & how to access the shared file from another Linux PC.

the host names of the PCs on my n/w are like this...
Linux60.domain.com
Linux61.domain.com
Linux62.domain.com
........ etc.

Linux server is not there in the n/w. all PCs are in the same workgroup.
I want to share a folder named "xyz" that is created in /home directory.

please help me.

if there are some other methods for sharing files and folders, then also guide me about that.

also help me about using SAMBA server for sharing linux with Windows.

thanx.
 
Old 08-28-2007, 05:37 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679
Which distro do you use? Many of them have a gui configuration that makes it easy setting up the NFS shares. Also read the nfs man page.

One thing you need to do to use NFS is to make sure that each user has the same UID number on each machine. Some installations will have a single home directory for a user mounted on one server, which is used regardless of which Linux/Unix computer they log in on.

To share /home/xyz with any host on the domain.com network, you could use this line in /etc/exports:
/home/xyz *.domain.com(rw,map_identity)

You will also want to enable the nfsd and portmap services to run in your normal runlevels. I already gave an example of using the mount command to mount the nfs share from another computer. You can also have an /etc/fstab entry in each of the other computers.

For samba, you can use swat, or your gui samba server configuration program. Look for the "Samba3ByExample" file in /usr/share/doc/samba-<version>/ or /usr/share/doc/packages/samba/. It has many sample configurations.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with sharing folders HyperTrey Linux - Networking 1 03-02-2007 02:21 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 07:14 AM
sharing folders or files Johina Linux - Networking 3 02-19-2005 03:52 AM
sharing folders jstephens84 Fedora 1 09-18-2004 01:13 PM
sharing folders atari303 Linux - Networking 5 05-26-2001 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:19 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
Open Source Consulting | Domain Registration