share - display file system shares or make local file system available share



  • System Administration Commands					     share(1M)
    
    
    
    NAME
           share  -	display	file system shares or make local file system available
           for mounting by remote systems
    
    SYNOPSIS
           share [-F protocol] -a
    
    
           share [-F protocol] [-o options]	[-d description] pathname [sharename]
    
    
           share [-F protocol] [-A]
    
    
    DESCRIPTION
           The share command defines and publishes	a  file	 system	 share,	 which
           means  the file system is available for mounting	through	a sharing pro-
           tocol.
    
    
           If the -F protocol option is omitted, the first file  sharing  protocol
           listed in /etc/dfs/fstypes is used as the default.
    
    
           For a description of NFS-specific share options,	see share_nfs(1M). For
           a description of	SMB specific share options, see	share_smb(1M).
    
    
           Using the share command to define and publish an	NFS or SMB share of  a
           ZFS  file system	is considered a	legacy operation. Consider setting the
           share.nfs property or using the zfs share command to define and publish
           an  NFS or an SMB share of a ZFS	file system. For more information, see
           share_nfs(1M) and share_smb(1M).
    
    
           In the third form of share command, as shown  in	 the  Synopsis	above,
           share  displays	published  shares or, with the -A option, displays all
           configured (defined) shares.
    
    OPTIONS
           -F protocol
    
    	   Specify the file sharing protocol.
    
    
           -o specific_options
    
    
    	   rw
    
    	       Share pathname is published with	read and write access  to  all
    	       clients.	This is	the default behavior.
    
    
    	   rw=client[:client]...
    
    	       Share  pathname is published with read and write	access only to
    	       the listed clients. No other systems can	access the share path-
    	       name.
    
    
    	   ro
    
    	       Share  pathname	is  published  with  read-only	access	to all
    	       clients.
    
    
    	   ro=client[:client]...
    
    	       Share pathname is published with	read-only access only  to  the
    	       listed clients. No other	systems	can access the share pathname.
    
    	   Separate  multiple  options with commas. Separate multiple operands
    	   for an option with colons. See EXAMPLES.
    
    
           -d
    
    	   Provide a comment that describes the	file system share to  be  pub-
    	   lished.
    
    
           -a
    
    	   Publish all defined shares.
    
    
           -A
    
    	   Display all defined shares.
    
    
    EXAMPLES
           Example 1 Publishing an NFS Share With Read-Only	Access
    
    
           The following command defines and publishes an NFS share	of /ufsfs with
           read-only access.
    
    
    	 # share -F nfs	-o ro /ufsfs
    
    
    
           Example 2 Publishing an NFS Share with Multiple Share Options
    
    
           The following command  defines  and  publishes  an  NFS	share  of  the
           /export/manuals	file  system with a netgroup called users_nfs who have
           read-only access	and users from specified hosts who have	read and write
           access.
    
    
    	 # share -F nfs	-o ro=users_nfs,rw=host1:host2:host3 /export/manuals
    
    
    
    FILES
           /etc/dfs/dfstab
    
    	   This	 file  is obsolete. An SMF service publishes NFS or SMB	shares
    	   at boot time.
    
    
           /etc/dfs/fstypes
    
    	   List	of file-sharing	protocols. NFS is  the	default	 file  sharing
    	   protocol.
    
    
    ATTRIBUTES
           See attributes(5) for descriptions of the following attributes:
    
    
    
    
           +-----------------------------+-----------------------------+
           |      ATTRIBUTE	TYPE	     |	    ATTRIBUTE VALUE	   |
           +-----------------------------+-----------------------------+
           |Availability		     |system/core-os		   |
           +-----------------------------+-----------------------------+
    
    SEE ALSO
           mountd(1M),   nfsd(1M),	 share_nfs(1M),	 share_smb(1M),	 shareall(1M),
           unshare(1M), zfs(1M), zfs(1M)attributes(5)
    
    NOTES
           If share	commands are invoked multiple times on the same	 file  system,
           the  last  share	 invocation  supersedes	 the  previous invocation. The
           options set by the last share command  replace  the  old	 options.  For
           example,	 if  read-write	 permission was	granted	to usera on the	legacy
           /somefs file system, then you want to grant read-write permission  also
           to userb	on /somefs, use	the following syntax:
    
    	 example% share	-F nfs -o rw=usera:userb /somefs
    
    
    
    
    
    SunOS 5.11			  24 Feb 2015			     share(1M)
    


© Lightnetics 2024