GEO NEWS

Tuesday 21 February 2012

Folder Sharing in Windows XP

In Windows XP we can allows network access to our files and folders. Users can then modify existing files, or create new files over network. To share our folders we can use two tools.  

Windows Explorer:-

The first tool is Windows Explorer. By going in to the properties of any folder, we can go to the 'Sharing' tab, where we can enable sharing of that folder. When we create a share, we have to name it. That is how our users will find the share. We also have to put permissions of the share, and we can also control the limits of the share. We can limit how many users can connect simultaneously to our share. By default, the limit is 10 users, and that is the maximum number of users as well. If we need more then 10 people accessing a share, we have to use Windows Server edition.
Another tool that we can use to manage shares is 'Shared Folders', which is located in 'Computer Management'. In 'Shared Folders' we can create new shares, or we can manage existing shares.

Accessing

To access a share, we can go to 'My Network Places', where we can see other computers on the network. When we open target computer, we can access shared folders or printers on that computer. Additionally, to access network share, we can use Universal Naming Convention (UNC) path. To access a share with UNC, first we have to type in '\\', then the computer name, then '\', and then the share name. So, if we have a share named 'Factis', on a computer named 'SilverCrest', the UNC path to that share would be '\\silvercrest\factis'.
When we install our system, the 'Administrative shares' get created. The 'Administrative shares' are accessible only by the administrators group. These shares are hidden by default. We can hide the share by putting the '$' sign after the name of the share. These share are not visible in network neighborhood. In order to access hidden share, we have to use UNC path. Of course, at the end of the UNC path will be the '$' sign. We can use '$' sign to hide our shares, so it is not visible by everyone in network neighborhood.

Enabling Sharing

If our computer is a new computer and is a member of a workgroup,  file and printer sharing is disabled. We will not be able to share folders and printers until we first enable sharing. For computers on a domain, sharing is automatically enabled.
The recommended method to enable sharing is to run the 'Network Setup Wizard'. Go to the 'Control Panel', click on the 'Network Setup Wizard', and click 'Next'.
Network Setup WizardNetwork Setup WizardChecklistChecklist
We have to ensure that we have installed network card, turn on all computers, printers, and that we have connected to the Internet. Click 'Next'.
ConnectionConnection
In our example we are connected to the Internet trough Local Area Connection. We will use the existing connection. Click 'Next'.
Computer NameComputer Name
Here we can enter computer description and change computer name. Click 'Next'.
WorkgroupWorkgroup
Here we can enter the Workgroup name. We will enter 'Workgroup'. Click 'Next.
Turn On File And Printer SharingTurn On File And Printer Sharing
Here we will select 'Turn on file and printer sharing'. Click 'Next'.
FinishFinish
Here we will select to just finish the wizard, and click 'Next'. Click 'Finish' to close the wizard.

Sharing a Folder

We can use Windows Explorer to quickly share a folder. Simply right-click the folder, open its properties, and then click 'Sharing' tab. In our case we will share the 'Manuals' folder, which is located on our E drive.
Manuals PropertiesManuals PropertiesManuals Sharing OptionsManuals Sharing Options
To share a folder, we have to check 'Share this folder on the network'.
Share is EnabledShare is Enabled
By default, users are not allowed to change our files. This way, users can only read our files. We will check 'Allow network users to change my files', and click 'Apply'.
Modify Is EnabledModify Is Enabled
Let's click OK. Notice the the icon of the folder is changed. It now indicates that the folder is shared.
Shared FolderShared Folder
In this example the computer is configured to use Simple File Sharing. If we want more control over file shares we need to enable advanced sharing. To do this, go to the Tools menu and Select Folder Options. Then go to the View tab, scroll down, clear the 'Use simple file sharing' check box, and click OK.
Simple File SharingSimple File Sharing
Let's open sharing options for Manuals folder again.
Advanced Sharing OptionsAdvanced Sharing Options
Now we can share the folder multiple times. Let's add an additional share by clicking on the New Share button.
New ShareNew Share
We can share this folder again with a different name. In this example we will name it Motorcycle manuals, and click OK.
Motorcycle ManualsMotorcycle Manuals
When using advanced sharing, we can set user limits. For example, we can set the maximum number of users to 2 users, instead of 10.
User LimitUser Limit
Notice that the maximum number of users for the original share name remains at maximum.
Original Share NameOriginal Share Name
We can also set different permissions for different share names. First we have to chose a share name from the drop down list, and then click on the Permissions button.
Share PermissionsShare Permissions
In our case, everyone can read data in Manuals folder.

Shared Folders Tool

We can use Shared Folders plugin in Computer Management to manage our shares. This plugin lets us view and manage all of our shared folders from a central location. To take full advantage of Shared Folders our computer needs to have advanced sharing enabled.
Shared FoldersShared Folders
Let's select Shares to see all shared folders on our system.
SharesShares
Here we can view and edit shared folder properties, such as user limits and permissions. For example, if we open the properties for Manuals, on the General tab we can edit the number of users allowed to connect.
General TabGeneral Tab
On the Share Permissions tab we can edit the share permissions.
Share PermissionsShare Permissions
On the Security tab we can edit the NTFS permissions.
NTFS PermissionsNTFS Permissions
Let's click OK. Now, let's create a new share. To create new share, right click Shares, select New File Share, and click Next.
New File ShareNew File ShareShare WizardShare Wizard
Now, we need to specify a folder to share. We can browse to find the folder that we want to share.
Folder To ShareFolder To Share
In our case we will select Paulaner folder, which is located on E drive.
Paulaner FolderPaulaner Folder
Now, we need to provide a share name. In our case, we will enter Paulaner.
Paulaner Share NamePaulaner Share Name
We can click Next. Now, we need to decide what type of share permissions to use. In this case we will use the default setting, in which all users have read access.
Share PermissionsShare Permissions
Click Next, and click Finish to share the folder. Notice that the folder has been successfully shared.
Paulanes Is SharedPaulanes Is Shared
The Sessions folder shows us who is connected to our computer right now.
SessionsSessions
Notice that the user Admin is currently connected to our computer. In Open Files we can see which files are accessed by which user.
Open FilesOpen Files
Let's say that we want to stop sharing Manuals folder. Before we delete the share, we should inform all connected users that we are going to delete the share. To do that, right click Shared Folders, select All Tasks, and then select Send Console Message.
Send Console MessageSend Console MessageMessageMessage
Click Send to send message. That will give them a chance to disconnect gracefully. Now, we can right click Manuals folder, select Stop Sharing, and click Yes to confirm.
Stop SharingStop SharingConfirmationConfirmation

Connecting to a Share

There are many ways to connect to a shared folder on another computer. For example, we can go to the start menu and use the Run command. From here we can type in the syntax to the share. This approach uses the UNC syntax or Universal Naming Convention syntax. We want to connect to the share named Public on a computer named Verson. The UNC path to that share is \\verson\public.
UNC PathUNC Path
When we open shared folder, we can go to the Tools menu, and map a network drive.
Share OpenedShare Opened
We have to select the drive letter that we want to use, and we have to enter the UNC path to the share. In our case we will select the Z drive, and enter the \\verson\public as our UNC path.
Map A Network DriveMap A Network DriveZ DriveZ Drive
Notice that our share is now Z drive.
Share Is MappedShare Is Mapped
We can find shares by browsing the network neighborhood. Let's go to the Control Panel, Network Connections, and select My Network Places from the left menu.
My Network PlacesMy Network Places
Here we can see all shared folder in a Workgroup. We can also see workgroup computers by clicking on the 'View workgroup computers' form the menu on the left.
Workgroup ComputersWorkgroup Computers
Let's open Verson computer. Let's map a drive with different user name this time. Right click Public, and select Map Network Drive.
Righ ClickRigh ClickMap Network DriveMap Network Drive
This time the UNC path is already entered. The drive letter will be Y this time. Let's select 'Connect using a different user name'.
Different User NameDifferent User Name
The user name will be Kim Verson this time.
Kim Verson UserKim Verson User
Click OK, and click Finish.
ErrorError
We will get an error. We can not map the same share with different drive letter, and with different user credentials. If we want to map the same share with different credentials, we have to disconnect existing network drive. To do that, go to the My Computer, right click network drive, and select Disconnect.
DisconnectDisconnect
We can also map a network drive by right clicking My Computer, and selecting Map Network Drive.
Map Network DriveMap Network Drive

Share Permissions

Trough Share Permissions we can control who will have access to our shares. These apply specifically to the network users. The Share Permissions can be on both NTFS and FAT partitions.
There are three levels of Share Permissions. Those are Full Control, Change and Read. Full Control gives us full control over all of the attributes of that particular share. It allows us to modify files, to take ownership, and to change permissions of that particular share. The Change permission allows users to do anything with the files inside the share. The Read permission allows users to read and execute the contents of the files that are in the shared folder.
With Share Permission we also have an Allow and Deny attribute. The Deny attribute explicitly denies particular permission. Deny will always over ride the Allow permission. This is useful when, for example, some user is a member of multiple groups, and we want to deny particular permission only for that particular user.
For local users, only NTFS permissions are applied. When a user access our shares over network, both Share Permissions and NTFS permissions are applied to him.
Let's take a look at Share Permissions on Manuals folder.
Share PermissionShare Permission
At this point, Everyone can read data in Manuals folder. We will add Accounting group to the ACL, and give it Full Control permission. To do that, click Add, type in 'Accounting', click Check Names, and click OK.
Accounting Added 
 Accounting Added
The default permission is the Read permission, so we had to check Full Control permission manually. Click OK to finish.
Share Permissions only restrict network access, while NTFS permissions restrict both local and network access. By setting NTFS permissions on a shared folders we have greater control over data access. When we enable sharing on some folder, by default, everyone will have the Read permission. Trough NTFS permissions we can set permissions more precisely.
The most restrictive permission will always be used to control network access. For example, if a user belongs to one group which has Change permission in Share Permissions, and to another group which has only Read permission in NTFS permissions, that user will only have Read permission on that particular folder. This is true for both Share and NTFS permissions.