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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-28-2007, 05:18 PM
|
#1
|
|
Member
Registered: Apr 2007
Distribution: Debian 4
Posts: 71
Rep:
|
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?
|
|
|
|
04-28-2007, 06:14 PM
|
#2
|
|
Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
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.
|
|
|
|
04-28-2007, 08:48 PM
|
#3
|
|
Member
Registered: Apr 2007
Distribution: Debian 4
Posts: 71
Original Poster
Rep:
|
SO what should i write in /etc/exports to get NFS & SAMBA?
|
|
|
|
04-28-2007, 09:44 PM
|
#4
|
|
Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
/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.
|
|
|
|
04-28-2007, 09:54 PM
|
#5
|
|
Member
Registered: Apr 2007
Distribution: Debian 4
Posts: 71
Original Poster
Rep:
|
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...
|
|
|
|
04-28-2007, 10:15 PM
|
#6
|
|
Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
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.
|
|
|
|
04-28-2007, 11:05 PM
|
#7
|
|
Member
Registered: Apr 2007
Distribution: Debian 4
Posts: 71
Original Poster
Rep:
|
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 ?
|
|
|
|
04-28-2007, 11:45 PM
|
#8
|
|
Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
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.
|
|
|
|
04-29-2007, 07:48 PM
|
#9
|
|
Member
Registered: Apr 2007
Distribution: Debian 4
Posts: 71
Original Poster
Rep:
|
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...
|
|
|
|
04-30-2007, 06:26 PM
|
#10
|
|
Member
Registered: Oct 2006
Location: brisbane - australia
Distribution: mepis, ubuntu, zenwalk
Posts: 334
Rep:
|
why don't you just create a fat32 partition and use in both os?
|
|
|
|
04-30-2007, 06:38 PM
|
#11
|
|
Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:14 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|