LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 02-15-2008, 11:15 PM   #1
salmageo
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Rep: Reputation: 0
HOWTO access a NFS mount within a SAMBA share from WINDOWS?


I am wondering if it is possible to mount an NFS drive within a SAMBA share so that a Windows client can view read-only the mounted component of the SAMBA share.

For example I have a SAMBA share called Software on Server X. Software has a path of /data/software. I am NFS mounting a dir from Server Y at Server X path /data/software/archive. On my windows client I am able to see the SAMBA share called Software, however I am unable to see the mounted NFS dir .

I have created a 2nd SAMBA share for the NFS mount on Server X, however this throws an error on my Windows machine saying I do not have the necessary permissions to view the directory.

How can I place mounted dir from a remote *nix server onto a SAMBA server share and have it accessible to Windows Clients? Or is there a better way?
 
Old 02-15-2008, 11:19 PM   #2
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 800

Rep: Reputation: 99
Why not just use Samba for all your shares. From what I understand, it is actually more secure than NFS unless you tunnel NFS thru ssh, but that's another story. I have an all Linux network, and I just use Samba for everything. Also allows access to shares from XBMC.
 
Old 02-15-2008, 11:26 PM   #3
salmageo
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
What I was hoping to do was design a primitive tiered storage system where aged files would move to a read-only location off the primary server, so that backup times on the primary would remain consistent, and the read-only files would only need to be backed up once.

Although the files would physically be on separate servers, depending on their age, the end-user would see a "seamless" list of all files.

I know someone one mentioned the use of symbolic links, however I don't think these can span servers. So what I was looking at doing was mounting the read-only files onto a mount point on the primary server, and allow users read-access only.

Thoughts?
 
Old 02-15-2008, 11:46 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Did you try mounting the NFS shares in a Samba directory?
 
Old 02-16-2008, 08:58 AM   #5
salmageo
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Yea I did and received permission errors. Interesting though that the UID was different on the two different SAMBA servers I am using. How can you sync UIDs?

Maybe that is the problem?
 
Old 02-16-2008, 01:17 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Ideally when you add the user. You can change them in the password file, but you'll need to change the owner of any files with the old UID
 
Old 02-16-2008, 01:31 PM   #7
salmageo
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the tip BillyMayDay!

Now back to my original dilemma. Can one mount an NFS drive within a SAMBA share and allow it to be listed and browsed from a windows client???
 
Old 02-16-2008, 09:24 PM   #8
jdavis2
Member
 
Registered: Feb 2007
Distribution: Fedora, Mandrake, Knoppix, Windows XP
Posts: 37

Rep: Reputation: 15
Yes it can be done. Just mount your exported NFS drive under a directory that you will share through Samba. And it will be right there just like a normal subdirectory under a Samba share.
 
Old 02-18-2008, 07:07 AM   #9
salmageo
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Well I tried again under two different scenarios:


1. Have a SAMBA share on Server X with an NFS mount from Server Y. Attempting to access the NFS mount from Windows Explorer, however it keeps asking for username to Server X.
2. Have a SAMBA share on Server X with an NFS mount within a SAMBA share on Server Y. Attempting to access the NFS mount from Windows Explorer, however connection times out.

NFS mount set to rw
SAMBA share is completely open


PS other SAMBA shares within Server X work fine
 
Old 02-18-2008, 09:39 AM   #10
jdavis2
Member
 
Registered: Feb 2007
Distribution: Fedora, Mandrake, Knoppix, Windows XP
Posts: 37

Rep: Reputation: 15
Here is what I did. I mounted the NFS drive in a Samba share the way I mentioned before. But what I did to connect was map a network drive from the Windows box.

I have the netbios protocols disabled and no network browsing. If you opt to try to map a network drive you will get the option to logon as a different user if you are using WIN2K or later.

However, with WIN2K or later you should get a logon prompt when trying to map a networked drive unless you are logged on to a domain using domain logon credentials.

If you are using WIN98 or earlier your only choice may be to create a user account on the Windows box that matches one on your Linux box and then setup your Windows box up so that you can logon to it as that linux user. If you do it one of these ways depending on your Windows version, I believe that you will be able to at least map a network drive to your Samba share.

Truthfully unless there is some kind of authentication problem you should have no problem seeing your NFS share through the Samba share if you can see the NFS share on your Linux box.
 
Old 02-18-2008, 09:02 PM   #11
salmageo
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
OK I think I solved the majority of problems I was having. Because I'm running SELinux, my mount command must include the context

-o context=system_ubject_r:samba_share_t

With this I am able to see my files off an NFS mount

Thanks everyone
 
Old 02-18-2008, 09:43 PM   #12
jdavis2
Member
 
Registered: Feb 2007
Distribution: Fedora, Mandrake, Knoppix, Windows XP
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by salmageo View Post
Because I'm running SELinux, my mount command must include the context

-o context=system_ubject_r:samba_share_t
That is very interesting! Thanks for sharing that solution.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
samba mount windows xp share eyt Linux - Software 2 10-26-2007 09:35 AM
LXer: Howto Browse a Samba or windows share securely over Internet LXer Syndicated Linux News 1 11-28-2006 01:35 AM
NFS Share access problem from Windows Help!!! Sabeer Linux - Networking 1 07-08-2003 08:59 AM
howto? samba share NTFS mount to W2K client slintz Linux - Software 0 06-02-2003 06:43 PM


All times are GMT -5. The time now is 02:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration