LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-22-2008, 10:39 PM   #1
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
NFS setup help


My home network looks like this -
Linksys wrt54GL with HyperWRT +tofu firmware.

4 personal use PCs all Linux, distros vary. 1 Slackware file server. Everything's wired, no wireless connections.

I have no issue creating a shared NFS folder across the network, and mounting, reading, writing to the share. What I want to do is restrict read/write access to some of the folders.

Each PC has 1 unique user + root. I'd like help with the following.

On <NFS>

/NFS - rw all
/NFS/A - rw user01 ro others
/NFS/B - rw user01,02 ro others
/NFS/C - rw user01,03 ro others
and so on.

At first I thought an /etc/exports something like this would work, but of course I'm wrong. I'm assuming the permission are being inherited from the top dir?

/mnt/NFS 192.168.1.0/24(rw) #The current setting
/mnt/NFS/01 disturbed(rw) 01(rw) 02(ro) 03(ro)
/mnt/NFS/02 disturbed(rw) 02(rw) 01(ro) 03(ro)

disturbed, 01, 02, 03 are from /etc/hosts
 
Old 04-22-2008, 10:52 PM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Something like this (with paths modified) is roughly what you want, I think.
This setup allows only 192.168.13.50 to have write access (even as root), and that's secure enough for me, as the only way to get on my wireless segment is with WPA - everything else is wired.

Code:
/shared		192.168.13.50/255.255.255.255(no_subtree_check,rw,sync,no_root_squash)
/shared		192.168.13.0/255.255.255.0(no_subtree_check,ro,sync,all_squash,anonuid=9000,anongid=9000,insecure)
 
Old 04-22-2008, 11:06 PM   #3
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133

Original Poster
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
I tried the below - with and without nohide, no_subtree_check/subtree_check.

/NFS/01 192.168.1.30(ro,nohide,no_subtree_check)
/NFS 192.168.1.0/24(rw,nohide,no_subtree_check)


What happens, is what ever I decide for /NFS is passed on to the sub dirs. If /NFS is rw, all users have rw to the sub dirs. If I pass ro for /NFS and rw for /NFS/01, /NFS/01 is still ro .
 
Old 04-22-2008, 11:21 PM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by disturbed1 View Post
I tried the below - with and without nohide, no_subtree_check/subtree_check.

/NFS/01 192.168.1.30(ro,nohide,no_subtree_check)
/NFS 192.168.1.0/24(rw,nohide,no_subtree_check)


What happens, is what ever I decide for /NFS is passed on to the sub dirs. If /NFS is rw, all users have rw to the sub dirs. If I pass ro for /NFS and rw for /NFS/01, /NFS/01 is still ro .
Hmmm, I just added this:
Code:
/shared/otherfiles	192.168.13.50/255.255.255.255(no_subtree_check,ro,sync,no_root_squash)
and it works as expected (/shared toplevel is rw, /otherfiles is ro).

No idea what's going on :/
 
Old 04-23-2008, 12:30 AM   #5
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133

Original Poster
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
I have no idea either.


Code:
/NFS              192.168.1.30(no_subtree_check,rw)
/NFS/00            192.168.1.30(no_subtree_check,ro)
/NFS is rw as is /NFS/00

Code:
/NFS              192.168.1.30(no_subtree_check,ro)
/NFS/00            192.168.1.30(no_subtree_check,rw)
/NFS is ro, as is /NFS/00


On <NFS> I did /etc/rc.d/rc.nfsd restart after each export change.
On the remote PC I went as far as stopping rc.rpc, unmounting the share, logging out of KDE, then starting rc.rpc and mounting the share.

Played around with no_subtree_check, and no_hide options. I'm using Slackware-12.1RC1.
 
  


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
NFS setup poonippi Linux - Networking 15 01-11-2008 03:19 PM
NFS setup xgreen Zenwalk 2 12-21-2007 06:41 AM
NFS setup rr_rr_29 Linux - Networking 2 09-17-2006 05:14 PM
NFS setup question: No password setup? ksgill Linux - General 4 12-04-2005 11:50 AM
NFS setup help please.. Damian Linux - Networking 2 09-11-2001 10:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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