The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how i can share from fc5 folder sadiquep Linux 0 04-07-2007 02:25 PM
how to share filesystem eykyn17 HP-UX 0 03-20-2007 09:36 AM
Which Files To Share WIth CSM? MyMateDave AIX 0 03-23-2006 02:24 AM
Share CD-Writer Sergiu-IT UNIX for Dummies Questions & Answers 2 05-12-2005 10:22 AM
How can I share dir Z0DiaC UNIX for Dummies Questions & Answers 4 08-28-2001 11:46 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2007
Registered User
 

Join Date: Jul 2007
Posts: 14
Stumble this Post!
NFS share options

Hello,

I'm doing a Perl script to parse the dfstab file and find dangerous configurations (rw to everyone, root access, etc). My question is, if I have a share command like this:

Code:
share -F nfs -o ro=chrome:copper:zinc,root=chrome /usr/man
it means that the /usr/man is "rw" to everyone (because "rw" isn't present) or the "ro" overwrites the default "rw" option? I'm a little confused on these details, could someone give me some lights?

Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-01-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
and nfs share of rw isn't necessarily dangerous, as it may be appropriate for clients to write to servers. the user/group/read/write/execute attributes are still respected, however you need to confirm that there is a one to one mapping for uids and gids between server and all clients.

the "root=" means that the root from server chrome will be allowed root access to this share. This would typically be used for diskless clients.
Reply With Quote
  #3 (permalink)  
Old 10-01-2007
Registered User
 

Join Date: Jul 2007
Posts: 14
Stumble this Post!
Well, I think I was not explicit enough. With that share options, it means that /usr/man is rw to everyone due to the absent of rw in the options configuration? Or the ro option overwrites the default rw behaviour? It's the same having this:
Code:
share -F nfs -o ro=chrome:copper:zinc,root=chrome /usr/man
or this:

Code:
share -F nfs -o ro=chrome:copper:zinc,root=chrome,rw /usr/man
?

Nevermind the other options, they're there just as an example.
Reply With Quote
  #4 (permalink)  
Old 10-01-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
A share is read/write unless the read only option is changes it.

Code:
                ro    Sharing will be read-only to all clients.

                ro=access_list
                      Sharing will be read-only  to  the  clients
                      listed  in  access_list;  overrides the  rw
                      suboption for the  clients  specified.  See
                      access_list below.
UNIX man pages : share_nfs (1M)
Reply With Quote
  #5 (permalink)  
Old 10-01-2007
Registered User
 

Join Date: Jul 2007
Posts: 14
Stumble this Post!
But the order matters? For example:

Code:
share -F nfs -o rw=chrome,ro=chrome /usr/man
and

Code:
share -F nfs -o ro=chrome,rw=chrome /usr/man
I think in the 1st the ro overwrite the rw and in the 2nd vice-versa. Right?
Reply With Quote
  #6 (permalink)  
Old 10-01-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by psimoes79 View Post
I think in the 1st the ro overwrite the rw and in the 2nd vice-versa. Right?
1. try it

2. it *may* be undefined behaviour,

however the doc says "ro" overrides "rw".
Reply With Quote
  #7 (permalink)  
Old 10-01-2007
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,513
Stumble this Post!
The most restrictive permissions apply, in this case it will be ro.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0