LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-02-2004, 10:05 PM   #1
toffi22
Member
 
Registered: Sep 2004
Location: Bonn, Germany
Posts: 32

Rep: Reputation: 15
Question mounted NTFS-disk cannot be shared with samba


Hi,

I have spent the entire evening, trying to access a ntfs-drive in my linux-box from my WinXP-Notebook but I just can't get it to work (and it's 3:50 a.m. now!)

I have put a 160GB harddisk into a linux box (LFS 5.1.1, console only) and mounted it:
/dev/hdd1 /mnt/toffi ntfs ro,uid=christoph,gid=christoph,umask=022 0 0

To check wether the data on the disk is ok, I then put in a Knoppix-Live-CD (3.6) and opened some of the Video-Files on the disk -> the disk and it's ntfs filesystem seem to be ok!

I then tried to share this disk using samba, to be able to access it from my notebook (WinXP): (from my smb.conf)

[toffi]
path=/mnt/toffi
read only = yes
browsable = yes
valid users = christoph

The linux-pc shows up in my network neighbourhood, as do its shares, including my ntfs-disk. By double-clicking on 'toffi', I get a listing of the disk's root directory.
However, any further click causes the explorer window to freeze for about two minutes until a folder is opened or a context menu appears. In the opened folder, the file-listing often remains blank and if the files are listed, I cannot open them.
Copying files from the ntfs-disk to my windows-box will result in corrupted files.
This problem only applies to the ntfs-share. All the other (ReiserFS) shares work fine!


So I tried to mount the ntfs-share on the server-machine itself:
mount -t smbfs -o username=christoph,password=passwd //linbox/toffi /mnt/test

The ntfs-disk then gets mounted to /mnt/test and i can browse and list folders as much as I like but when I try to open a file with less, I get an error message:
smb_request: result -5, setting invalid

I did all this as root.

As the files are okay and the problem does not seem to be M$-specific, something has to be wrong with my Linux-machine.

So I booted from the Knoppix-Disk one more time, mounted the ntfs-disk and shared it and voilą: I can access any file from my notebook and it's fast! So I copied the samba-configuration from the Knoppix-disk (at least partly) but that didn't help either.

Maybe all this has to do with user-rights.. I don't know.. and I really do not have any idea what I can try..

* P L E A S E * H E L P * M E *
 
Old 09-02-2004, 10:13 PM   #2
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
Try my smb.conf. It works but its absolutely evil since anyone can access it and it shares /.
If it works, tweak it to your setup.

[global]
workgroup = MSHOME
wins support = yes
encrypt passwords = yes
browsable = yes
security = share

[root]
path = /
read only = yes
guest ok = yes
public = yes

Here is the online version of the samba book

www.faqs.org/docs/samba/ch00.html
 
Old 09-02-2004, 10:38 PM   #3
toffi22
Member
 
Registered: Sep 2004
Location: Bonn, Germany
Posts: 32

Original Poster
Rep: Reputation: 15
Thanx for the quick answer!!

I tried your config and I can access my ntfs share (as I could when I was using security=user). Again, I get a listing of the root dir but as soon as I click on a folder or a file, the explorer freezes and sometimes, the explorer window even disappears.
Two other WinXP Computers in the network show the same behaviour.

I guess I'll first get some hours of sleep now
 
Old 09-02-2004, 11:06 PM   #4
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
Your problem most likely is on the client. Try reconfiguring the network protocols by going to network connections-> connection you're using -> disable the file sharing protocol -> exit -> renable file sharing
 
Old 09-03-2004, 05:35 PM   #5
toffi22
Member
 
Registered: Sep 2004
Location: Bonn, Germany
Posts: 32

Original Poster
Rep: Reputation: 15
IT WORKS

it appears I compiled samba with sendfile-support (default setting) and sendfile does not seem to like ntfs..

Adding 'use sendfile = no' to my smb.conf solved the problem!
 
  


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
Samba - sharing mounted NTFS partition SirAeryn Linux - Networking 2 09-11-2005 09:54 PM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 09:23 AM
Windows XP/NTFS + Virtual PC/Mandrake + Samba = Shared Directories? IamI Mandriva 1 12-18-2004 07:06 PM
mounted disk not accessible via samba revrev Linux - Networking 1 11-29-2003 03:10 AM
changing access to mounted shared drive shycalais Linux - Newbie 4 11-11-2003 05:13 AM

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

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