LinuxQuestions.org
Help answer threads with 0 replies.
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 04-28-2007, 06:18 PM   #1
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Rep: Reputation: 15
Still CANNOT Share Folders


I tried to share a folder but I got following message:

Sharing Services are not installed
You need to install at least either SAMBA or NFS in order to share folders

I checked with Synaptic Package Manager and it showed I already have installed NFS. I have also installed after that SAMBA.

It still shows the same error message when I'm trying to share saying to install SAMBA or NFS.
Both SAMBA & NFS also don't show in the list of Services that I opened with command

services-admin

Any idea that could help me ? I only want to share folders from my hard disk from the same computer (NTFS already mounted) under specific names (that is how I shared them in Windows:

computer name: DATA
folder shared under name: Music
path: //DATA/Music/...

This way all my music files would be under one path name (computername/sharedfoldername/ regardles of where they would be located) and then all my lists files could be always the same

Any idea how I could make in Linux to share those old folders?
 
Old 04-28-2007, 07:14 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
So did you edit /etc/exports then to get NFS?

btw, I seem to remember you regretted that Linux doesn't have more Graphical apps to assist in tasks like this one. If you had installed Fedora instead of Debian, that's precisely what you would have had to set up NFS.. Fedora is just far more graphical on the whole.
 
Old 04-28-2007, 09:48 PM   #3
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Original Poster
Rep: Reputation: 15
SO what should i write in /etc/exports to get NFS & SAMBA?
 
Old 04-28-2007, 10:44 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
/etc/exports configures NFS, not Samba. I'll tell you what to do to set up NFS.

Open /etc/exports on the pc that will be the server and add this:

/path/to/directory/on/the/server/to/be/shared 192.168.0.0(rw,sync,no_root_squash)

The 192.168.0.0 address is just an example; replace with the actual address of your client computer. The address is followed by a series of options: rw means the client can read and write, sync concerns data integrity (async is faster but can lead to data loss), no_root_squash means that root on the client computer can access the share too (root_squash means he can't)).

Now start the required services on the server by using these commands:

/etc/init.d/portmap start
/etc/init.d/nfs-common start
/etc/init.d/nfs-kernel-server start

You can check whether it is working by using this command:

exportfs -v

Now, in order to mount the NFS share on the client, you could use this command (ont the client, obviously):

mount -t nfs IP-address(of the server):/path/to/directory/on/the/server /mount/point/on/the/client

Or you can add this to /etc/fstab on the client to make it permanent:

IP-address:/path/to/share/on/the/server /mount/point/on/the/client nfs defaults 0 0

If you need to edit /etc/exports, you need to stop the services first and start them again when you're done.
 
Old 04-28-2007, 10:54 PM   #5
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Original Poster
Rep: Reputation: 15
It might sound funny but I only have one computer... what I want to achieve is to "share" a folder (like in windows) under a chosen "name" (i right clicked the folder to share it and I got the message regarding NFS and SAMBA). So what will then be the server and what the client if I only have one computer... sounds confusing to me...
 
Old 04-28-2007, 11:15 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Hehehe, it's been a while since I last used Windows so I haven't got a clue what you are talking about. Let me get this straight: you want to make a directory called music; then you want that directory to "contain" all your music files, even those which are in a different directory. Is that it?

NFS and Samba, btw, are used on networks. You shouldn't need them if you have only one computer.
 
Old 04-29-2007, 12:05 AM   #7
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Original Poster
Rep: Reputation: 15
when I use windows my computer has a name (say John) and I can "share" a folder under a chosen name (say Jane). Then I can access any file in that folder by the path //John/Jane/filename. This way I can always access a specific file by that path (//John/Jane/filename) even if later I decide to move the folder in any another location (as long as the "share" stays the same). I thought that I can do the same in Linux (share any folder by a chosen name and then access by the path).. Or maybe there is an easier way ?
 
Old 04-29-2007, 12:45 AM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Oh yes, now I remember. I did use that on a couple of occasions but I wasn't aware one could move folders from the share to a different location.

Well, I'm thinking hard but I just can't seem to find a Linux equivalent. I think the closest alternative is to use symlinks. Here's an example:

/music/A

is a directory that contains all artist names starting with an A. You want the directory to be accessible from elsewhere, for example from your home directory. You would do this:

ln -s /music/A/ /home/stefan/

That would create a symbolic A folder in your home directory: the contents are still where they were originally but they can now be accessed both from your home directory and the original folder; if you click on the link in your home dir, you see the files that are actually under /music/A.

Or if you have a folder in your home directory (say /home/stefan/B/) that you want to add to /music:

ln -s /home/stefan/B/ /music/

If you then do

ls /music/B,

you will see a list of the files that are actually in your home/stefan/B directory.

This may seem a bit confusing at first but it's really quite easy.
 
Old 04-29-2007, 08:48 PM   #9
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Original Poster
Rep: Reputation: 15
Thanks for the tip.. I already tried the symlinks and it works good (in graphical mode doesn't work on ntfs volume but as long as it works as command line it is ok). By the way... SAMBA works now but I don't need it (-: for now...
 
Old 04-30-2007, 07:26 PM   #10
wabbalee
Member
 
Registered: Oct 2006
Location: brisbane - australia
Distribution: ubuntu
Posts: 335

Rep: Reputation: 38
why don't you just create a fat32 partition and use in both os?
 
Old 04-30-2007, 07:38 PM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
As I understand it, he wants to able to place his files about anywhere, scattered all over the pc - and yet be able to access them from a single path. Using a share partition wouldn't be helpful in that case.
 
  


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
Cannot Share Folders StefanP Linux - Newbie 3 04-28-2007 02:29 PM
Can't share Linux folders--why not? watha Linux - Networking 1 10-21-2005 07:43 AM
Share folders hylke Linux - Newbie 8 10-22-2004 02:32 PM
Share Windows Folders Foggy Linux - Newbie 21 12-09-2003 07:57 PM
Samba Share Folders chrisfirestar Linux - General 1 10-03-2003 05:23 AM


All times are GMT -5. The time now is 09:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration