Solved

Sharing directories outside of your home to windows network

Posted on 2003-11-14
9
320 Views
Last Modified: 2010-03-18
I have just installed samba to allow me to share to a windows network. However, when I try to share a directory outside of my home, it tells me that I cannot (I have tried logging on as root also).

(I am running mandrake 9.1)

Ideally, I would like to be able to share directories in my /mnt - I have several ntfs formatted harddisks which I would like to be able to share to the rest of our network.

Thanks in advance,

dc.
0
Comment
Question by:dcollis
  • 5
  • 4
9 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 75 total points
Comment Utility
It  isn't a problem to export an SMB share for something outside of your home dir with something along the lines of:

[share1]
  comment = Shared disk 1
  path = /mnt/disk1
  public = no
  readonly = yes

[share2]
  comment = Shared disk 2
  path = /mnt/disk2
  public = no
  readonly = yes

The difficulty will file ownership on the mounted volume since they are NTFS volumes. You need the perms on the mount point to be readable by every one since NFTS files don't have Unix style triples (user, group, other).
0
 

Author Comment

by:dcollis
Comment Utility
sorry, im a bit of a novice when it comes to linux networking. - How do i set up the code above?
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Those directives need to be added to the end on your smb.conf file, typically /etc/samba/smb.conf. After changing the file samba must be restarted for the change to take effect.
0
 

Author Comment

by:dcollis
Comment Utility
I'm still struggling to get this to work.
I updated the smb.conf file with what I though were the correct entries.
Now when I enter network neighbourhood on one of the windows machines, I can see the linux computer listed in the workgroup i specified, but cannot access it (comes up with username/password box where no usernames/passwords I enter work - including root).
How can I make it so that anyone in the workgroup (i.e. a guest) can access the dir (for read but not write)?

thanks for the help so far,

dc.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
To make the shares accessible to everyone include a 'public = yes' in each share definition.
0
 

Author Comment

by:dcollis
Comment Utility
Now, others can enter the directory i shared, but only for a couple of seconds, as when they do, the computer sharing crashes.
Any ideas why this might be?
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Since you don't see that problem with SMB shares that point to things located on a Linux file system my guess would be that the problem lies with the NTFS support. Support for access to NTFS file systems is pretty much "experimental" in Linux and it may not work quite right.

The only "fix" that occurs to me for this would be to copy the data from the NTFS mount points to Linux file systems and share that to the windows machines.
0
 

Author Comment

by:dcollis
Comment Utility
Way to much data (>150gb) to copy onto my linux partitions.

I think you answered my original question so will give points now. Still doesn't work for me as it always crashes. It crashes when I do any filesharing it seems. It also crashes when I transfer files to and from my server using gFTP (though it does work briefly). Also when browsing the directories from a windows machine, it also allows browsing for a short period before it crashes...
Im assuming this is some kind of problem with my network settings...but have no idea what it could be, as other things, such as email, www, ssh, msn etc all work perfectly....

any ideas? guess i should post another question with this one...

cheers anyway,

dc.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Ah! I think I probably know what the problem is if FTP has problems. This sounds like a ethernet link mode mis-negotiation issue. What that means is that both ends of the network link aren't operating in the same duplex mode (one end at HDX, the other at FDX). This is more common with 100Mbs NIC's and hub/switches, but it can happen on a 10Mbps network. The solution is to force one, or both ends of the link to a sane mode (HDX if connected to a hub, FDX if a switch). Such a link will work, if a bit slowly, until you try some large data transfer.

You may be able to find a diag/setup program at http://www.scyld.com/page/support/network/ for your NIC that can be used to set the link mode.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now