Skip to main content

Create an SMB share with the force-group share setting

Contributors netapp-ahibbard netapp-thomi netapp-aherbin

You can create an SMB share with the force-group share setting if you want SMB users that access data on volumes or qtrees with UNIX file security to be regarded by ONTAP as belonging to the same UNIX group.

Step
  1. Create the SMB share: vserver cifs share create -vserver vserver_name -share-name share_name -path path -force-group-for-create UNIX_group_name

    If the UNC path (\\servername\sharename\filepath) of the share contains more than 256 characters (excluding the initial “`\\`” in the UNC path), then the Security tab in the Windows Properties box is unavailable. This is a Windows client issue rather than an ONTAP issue. To avoid this issue, do not create shares with UNC paths with more than 256 characters.

    If you want to remove the force-group after the share is created, you can modify the share at any time and specify an empty string ("") as the value for the -force-group-for-create parameter. If you remove the force-group by modifying the share, all existing connections to this share continue to have the previously set force-group as the primary GID.

Example

The following command creates a “webpages” share that is accessible on the web in the /corp/companyinfo directory in which all files that SMB users create are assigned to the webgroup1 group:

vserver cifs share create -vserver vs1 -share-name webpages -path /corp/companyinfo -force-group-for-create webgroup1