LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-09-2005, 05:46 AM   #1
SirAeryn
LQ Newbie
 
Registered: Sep 2005
Location: Port Hedland, Western Australia
Distribution: Fedora Core 4
Posts: 18

Rep: Reputation: 0
Samba - sharing mounted NTFS partition


My setup is reasonably simple. I have two computers. One, [Aaron], runs only WinXP Home (this is the client for Samba), and the other, [Spider], has two drives, one with Linux (FC4), and the other with WinXP Pro (same as having two partitions) and is setup for dual boot.

The shared directories on the linux machine are:
[Downloads] = /home/Aaron/Downloads
[WinXP] = /media/WinXP (this is the mount point for my WinXP drive)

I can view the shares on [Aaron] (Win) through samba ok. I can also view the normal linux share, Downloads, on [Spider] from [Aaron].

However, when I try to view [WinXP] on [Spider] FROM [Aaron], I get a network error. On the linux box, I can browse around the mounted Windows drive/partition using Nautilus or a Terminal without a problem.

The smbusers and smbpasswd files are setup and work correctly - as evidenced from being able to login and browse the linux share.

Smb.conf contains:
[WinXP]
Comment = Windoze XP
Path = /media/WinXP
Writeable = no
Browseable = yes
Valid users = Aaron

smbclient on Spider gives this error:
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
this is after accepting my login.

From other information I have read, I believe the problem may be with the mount permissions on the WinXP mount point (particularly as I have no trouble accessing the linux shared directory).

the log file after an attempted access has:
/media/WinXP does not exist or is not a directory, when connecting to [WinXP]

I read somewhere that the mount point to share via Samba had to be in the home directory, so I tried mounting it in /home/Aaron/WinXP. The errors were the same as above. I tried changing the ownership when I mounted it... ie:
mount -t ntfs /dev/hdb1 /home/Aaron/WinXP -o ro,umask=0222,uid=500,gid=500

This made no difference either.

I've seen similar problems in various forums before, but haven't found a solution that applies here.

I thought if I can browse a mounted drive, then why wouldn't I be able to share it... unless I need an ntfs driver for the Samba server too. You'd think it would be using the standard file system though.

Any help would be appreciated!
 
Old 09-11-2005, 03:36 AM   #2
SirAeryn
LQ Newbie
 
Registered: Sep 2005
Location: Port Hedland, Western Australia
Distribution: Fedora Core 4
Posts: 18

Original Poster
Rep: Reputation: 0
Solved the #$%@#$% thing!!

It had nothing to do with samba or mount permissions!
It was SELinux! I found a very brief mention in a bug report on bugzilla . samba . org that mentioned SELinux being set to permissive.

I've done this and it now all seems to work. I'm not sure that this is the safest option, but until I work out which parts of SELinux to disable then it's the best I can do.
 
Old 09-11-2005, 08:54 PM   #3
SirAeryn
LQ Newbie
 
Registered: Sep 2005
Location: Port Hedland, Western Australia
Distribution: Fedora Core 4
Posts: 18

Original Poster
Rep: Reputation: 0
I have SELinux back to enforcing mode without disabling all the checkboxes under Security Level for Samba. The only one I have ticked is Allow access to home directories.

I changed the options in my /etc/fstab file for the ntfs mount
The options are now:

ro,users,owner,umask=0222,fscontext=system_u:object_r:mnt_t

however when I look in /media and run # ls -Z it shows no context for the /media/WinXP directory.
As long as it works I'm happy... but perhaps someone can tell me why it works! ;o)

Last edited by SirAeryn; 09-11-2005 at 08:56 PM.
 
  


Reply



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
Problem reading mounted NTFS partition... Virak Linux - Newbie 8 08-18-2005 04:38 PM
(re)sharing an nfs-mounted folder with samba rtspitz Linux - Networking 1 02-13-2005 01:36 PM
NTFS partition cannot be mounted after converting from FAT32 aweir14150 Mandriva 5 01-27-2005 03:11 PM
mounted NTFS-disk cannot be shared with samba toffi22 Linux - Networking 4 09-03-2004 04:35 PM
permission of mounted NTFS partition demmylls Linux - Security 2 11-29-2003 11:08 PM

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

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