Creating and changing a share

Ways to share folders

If you want to create a folder to be shared by CIFS clients, do one of the following:

Creating a share from Server Manager

To create a share from the Windows NT desktop using Server Manager, create a folder, then share it by following these steps.
Step Action
1 Create a folder on the filer.
2 Open Server Manager by choosing it from the Start menu.
3 From the Server Manager Computer menu, choose Select Domain.
Result
The Select Domain window opens.
4 In the Select Domain window, select the filer you want by typing its UNC name, for example, \\FILERNAME, in the Domain field, then clicking OK.
Result:
A Server Manager window for the filer appears.
5 Chose Computer > Shared Directories, then click the New Share button.
Result
The New Share window appears.

6 Type a name for the new share in the Share Name field. The share name is case-sensitive.
7 Type the local path here of the folder you created in Step 1. This is usually C:\VOL\VOLNAME\FOLDER.
8 Type a description of the share in the Comments field, if you want.
9 If you do not want to limit the number of users that can connect to the share at the same time, select Maximum Allowed under User Limit.
10 To limit the number of users that can connect to the share at the same time, click the arrows next to Users until the desired number appears.
11 If the share has Windows NT security, click Permissions to set permissions.
12 Click OK.
Result
The New Share window disappears and the share is created.

Changing the share description and user limit with Server Manager

To change the description and user limit with Server Manager, follow these steps.

Step Action
1 Open Server Manager by choosing it from the Start menu.
2 From the Server Manager Computer menu, choose Select Domain.
Result
The Select Domain window opens.
3 In the Select Domain window, select the filer you want by typing its UNC name, for example, \\FILERNAME, in the Domain field, then clicking OK.
Result:
A Server Manager window for the filer appears.
4 Choose Computer > Shared Directories.
Result
The Shared Directories window appears.

5 Double-click a share name.
Result
The Share Properties window appears.

6 Type a new description of the share in the Comments field, if you want.
7 If you do not want to limit the number of users that can connect to the share at the same time, select Maximum Allowed under User Limit.
8 To limit the number of users that can connect to the share at the same time, click the arrows next to Users until the desired number appears.
9 Click Permissions to change share-level permissions.
10 Click OK.
Result
The window disappears and the new values go into effect.

Creating a share with the cifs shares command

Following is the syntax for the cifs shares command for creating a share:

cifs shares -add sharename path [ -comment description ] 
[ -forcegroup groupname ] [ -maxusers n ]

The following table describes the parameters.

Variable Description
description A string describing the purpose of the share. It must contain only characters in the current code page. It is required by the CIFS protocol and is displayed in the share list in Network Neighborhood on the client. If the description contains spaces, you must enclose it in single quotation marks.
groupname The name of the group you want all files in the share to get the group membership of.
n The maximum number of users that you specify can connect to the share at the same time. The limit on this number is dependent on filer memory, and is shown in "Limits on CIFS open files, sessions, and shares."
path The path name, relative to the root of the filer's file system, of the root directory of the share.

Note: Because the cifs shares command is case-sensitive, be sure that you use the appropriate case when entering the path name. Separators used in the path name must be forward slashes (/).


sharename The name of the share, which is used by CIFS users to obtain access to the directory on the filer. If sharename already exists, the cifs shares -add command fails.

Caution: Do not create shares whose names end with a dollar sign ($); doing so might cause conflicts with reserved names. In particular, do not create shares called C$ or ADMIN$. C$ is a reserved share name and ADMIN$ is an illegal share name.


Example

The following example creates a new share called library:

cifs shares -add library /vol/vol0/home/lib 'New file library'

This example creates the library share and defines it as HOME\LIB (/home/lib in UNIX notation) in the filer's root volume. With the appropriate access rights, CIFS users can gain access to the HOME\LIB directory in the root volume, which is displayed as the library share on their computers. For more information about setting access rights, refer to "Assigning and changing access rights."

Using the cifs shares command to change the share

To change the description, forced file ownership, and user limits of a share, use the following command:

cifs shares -change sharename [ -comment description | -nocomment ] 
[ -forcegroup groupname | -noforcegroup ] 
[ -maxusers n | -nomaxusers ]

The following table describes the parameters.

Parameter or variable Description
description A string describing the purpose of the share. It must contain only characters in the current code page. It is displayed in the share list in Network Neighborhood on the client. If the description contains spaces, you must enclose it in single quotation marks.
groupname The name of the group you want all files in the share to get the group membership of.
n The maximum number of users that you specify can connect to the share at the same time. The limit on this number is dependent on filer memory, and is shown in "Limits on CIFS open files, sessions, and shares."
-nocomment Specifies no description.
-noforcegroup Specifies no particular group to own the files that are created in the share.
-nomaxusers Specifies no maximum number of users that can connect to the share at the same time.
sharename The name of the share, which is used by CIFS users to obtain access to the directory on the filer. It must contain only characters in the current code page.

Copyright © 1999, Network Appliance, Inc. All rights reserved.

Part No. 210-02334
File: cifs9.htm
Last updated: 02/24/99 12:16:32