LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2004, 02:04 AM   #1
rmdnet
Member
 
Registered: Aug 2003
Posts: 30

Rep: Reputation: 15
shares not in home folder


Hi,

I wanted to ask if it's possible to share folders outside my home folder.
I have another partition called /mnt/D where I store a folder with music and I wanted to share it but I don't know how.

Thanks
 
Old 11-10-2004, 04:59 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
To share SMB shares (as used by Windows), look at Samba.
To publish an NFS directory (as used by UNIX), look at the NFS server documentation.

I assume from your post that you have some mechanism of sharing files/folders within your home directory; how do you do this?

You will probably need to be root to share a directory, especially if you don't have write/execute access to it as a regular user.
 
Old 11-10-2004, 05:52 AM   #3
rmdnet
Member
 
Registered: Aug 2003
Posts: 30

Original Poster
Rep: Reputation: 15
Hi rjlee,

Yes, I use Samba because my girlfriend's pc uses Windows 2000 (I'm trying to convert her to Linux, hehe). I also use Suse 9.1 as you and I added the folders I want to share with yast. And when I try to share a folder outside my home folder it does not allow me to do that. And to setup that I need root password, so I'm already root, isn't it?

Thanks

rmdnet
 
Old 11-10-2004, 06:08 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
Entering the root password gives you root privilages, it doesn't necessarily set your username as root.

But if YaST won't let you do it, then it probably just won't let you for some reason. you might try editing smb.conf by hand to add a new share. Alternatively, change the mount point of /mnt/D in /etc/fstab to put it under your home directory (you may need to add an empty directory to use as the mountpoint).

Edit: Or run
Code:
mount --bind /mnt/D /home/user/mountpoint/
(you will need Linux 2.4 or above for this to work). This will mount the filesystem in two places at once.

Last edited by rjlee; 11-10-2004 at 06:10 AM.
 
Old 11-27-2004, 12:40 AM   #5
kcJUGGALO
LQ Newbie
 
Registered: Nov 2004
Posts: 3

Rep: Reputation: 0
whats the command...

How can I undo the "mount --bind /mnt/D /home/user/mountpoint/" so that its not there anymore... thanks
 
Old 11-27-2004, 06:57 PM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
Re: whats the command...

Quote:
Originally posted by kcJUGGALO
How can I undo the "mount --bind /mnt/D /home/user/mountpoint/" so that its not there anymore... thanks
Same as any other mountpoint:
Code:
umount /home/user/mountpoint
As with any mountpoint, make sure that no-one is CDed into that directory, and no process has a file/directory/pipe handle open under /home/user/mountpoint, or it won't let you unmount it. (You can't unmount a filesystem that's in use)
 
Old 11-28-2004, 03:34 AM   #7
kcJUGGALO
LQ Newbie
 
Registered: Nov 2004
Posts: 3

Rep: Reputation: 0
umount: /home/user/MOVIES: not mounted


Thats what i'm getting with the umount command... and i don't see any config file that says its binded with the original mnt point which is /mnt/win_c2
 
Old 11-28-2004, 06:07 AM   #8
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
What does it say for this mount-point in /proc/mounts?

I've just tried binding a mount-point on my system, and it doesn't seem to indicate that it's bound in any way to the original (I think it just creates a second mount for the device, so no such binding really exists). But I can unmount it with umount, with or without the trailing slash.

You may need to specify the full path, or it will assume that it's relative to /, and you obviously need to type the directory name correctly (including capitalisation).
 
Old 11-28-2004, 01:02 PM   #9
kcJUGGALO
LQ Newbie
 
Registered: Nov 2004
Posts: 3

Rep: Reputation: 0
Weird... but I got rid of it by simply deleting the folder in the /home dir and the files are still on the original /mnt drive so all is good... thanks very much for the replies though and the --bind command thats handy.
 
  


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
win xp home edition and samba home shares scheidel21 Linux - Software 8 10-09-2008 12:47 AM
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 02:09 PM
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM
Samba XP shares: Only first 36 folder visible in Konqueror sugna Linux - Software 1 07-04-2005 07:59 AM
gnome home folder and trash folder ambelos Linux - Software 2 02-24-2004 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:21 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