Wednesday, May 25, 2005

More Fun with Sharepoint Permissions

When assigning permissions at the list level to prevent non-administrators/contributors/etc. from viewing items, it is tempting to simply remove the "Reader" group; however, doing so causes permissions to be inherited, effectively circumventing the list permissions settings if Readers have View Items at the Site level.

To prevent readers from viewing list items, go to Advanced Permissions and uncheck all options except 'Cancel Check-Out' (WSS requires that at least one option be selected for a group). This will also ensure that users who see the document in search results are prompted for proper credentials before accessing the item.

Tuesday, May 24, 2005

Index Propagation Permissions in Server Farm

When SPS is deployed in a server farm configuration, with the index server on a different machine than the front-end server(s), the propagation process may fail if permissions are not configured correctly. In the event log of the Index server, one or more of the following errors may appear:

  • An error occurred while propagating to search server
  • A connection with the Search service on a remote machine could not be established. Check the connectivity with the remote machine. If necessary, stop and restart the Search service on the remote machine. (0x8004111a)
  • 0x80070035 - The network path was not found. )
  • Index propagation stopped.

First, verify the account being used by the index server to enumerate the local services on the front-end server by monitoring the security log in the Event Viewer (if the account does not match the Default Content Access Account specified in the Server Farm Account Settings, re-enter the domain/username and password). To resolve the issue, add the content access account as a local administrator to each front-end server (Note: In some cases the account must be referenced explicitly - simply adding a domain group with administrative rights will not suffice).

Once the proper permissions are set, force propagation on each server (Sharepoint Central Administration > Manage Search Service > Manage Search Propagation). It may also be necessary to remove the search component from the front-end servers, reboot, then re-add it.

Managing Approvals With List Views

Unlike SPS 2001, SPS2003 contains no basic workflow functionality. Users are able only to submit items for approval/rejection on a per-list basis; content approvers must subscribe to alerts for each library in order to be notified of submissions that require action, or browse to each list to check the status. This is definitely an area where Microsoft has fallen short in migrating functionality from v1 to v2.

Several web parts exist that provide an "inbox" for displaying all items by approval status but I haven't had much luck with them - they tend to fall into the following categories: a) open-source projects that were never finalized and contain many bugs, b) free utilities that haven't been tested in all deployment scenarios (i.e. server farms), or c) add-ons available only within expensive workflow management products. Not an encouraging landscape.

Fortunately, there is a way to use List Views to achieve a rudimentary form of centralized approval management. Although it doesn't filter by current user or provide an alerting function, it will give content approvers a centralized view of pending items.

Begin by enabling approvals for each list (announcements, events, document library, etc.):

1. Click on 'Modify Settings and Columns'
2. Click on 'Change General Settings'
3. Select 'Yes' in the Content Approval section.
4. Click 'Ok'.

This will add two new views to the list: "Approve/Reject Items" and "My submissions". The "Approve/Reject Items" view displays all Pending, Rejected, and Approved items. To modify this view to show only Pending items, do the following:

1. Click on 'Modify settings and columns'.
2. In the Views section, click on 'Approve/reject items'.
3. In the Filter section, click the radio button titled "Show items only when the following is true:".
4. Select "Approval Status" from the drop-down.
5. Enter "Pending" in the text field below the operand selector.
6. Click 'Ok'.

Repeat this process for each list that requires approvals. Alternatively, if you want to preserve the standard 'Approve/Reject' view, create a new view using the standard view as a template and modify it as necessary.

We now need a web part page or list to hold the view web parts for each approval list. Using a web part page is easier in the long run, as view web parts can easily be added to the page as additional lists are created using the 'Modify Shared Page' function; however, a static link will have to be created for the page (or users will have to navigate to the library it's stored in). Using a custom list solves the navigation issue but view web parts can only be added in Frontpage (if anyone knows how to add the 'Modify Shared Page' drop-down to a list, please share the secret).

For this example we'll use a web part page:

1. Create a new Web Part Page from the Create menu.
2. Modify the page and Drag each list web part into a web part zone.
3. Set the Selected View to 'Approve/reject items'

Once all web parts have been modified, the resulting page will dispaly the pending items for each list. As new approval lists are added to the site, the process can be repeated to maintain a centralized view.

NOTE: If you want to try your hand at directly editing code in Frontpage, you can remove the header, navigation, etc. from the web part page, then call that page from a Page Viewer Web Part. This would give you the ability to easily add parts to the source page and an automatic link to the views in the Lists section of the left-hand navigation.

Thursday, May 12, 2005

Add Date String to Backup Jobs

Both the GUI and command-line versions of the Sharepoint Backup and Restore Utility allow you to specify the location and prefix for SPS backup files; however, they do not provide a time-stamp feature for multiple date backup scenarios (daily, weekly, etc.). To prepend the date to your backup job in the format 'mm_dd_yy', use the following syntax:


To include a timestamp in the format 'hh-mm', add the following syntax:


If you are running spsbackup from the command-line, the command would look like this:

spsbackup.exe /all /file \\{server}\{directory}\%date:~4,2%_%date:~7,2%_%date:~10,4%-%time:~0,2%_%time:~3,2%

Wednesday, May 11, 2005

Deploying Web Parts In A Server Farm After Installing WSS SP1

After the installation of WSS SP1, deploying web parts in a server farm scenario with stsadm.exe may no longer be possible. Command line operations for "addwppack" may fail, producing a "server instance not found error". According to this post, the issue results from a failure to upgrade the IIS server during installation of the service pack. While the primary front end server may work fine, other servers in the farm may require the "stsadm.exe -o upgrade" operation. After upgrading full functionality should be restored. Try this solution if you are encountering similar errors.

Tuesday, May 10, 2005

PDF Icon in Search Results

Here's a tip I had forgotten about. Sometimes it's the little things that make a new implementation really shine.

Tuesday, May 03, 2005

Sharepoint CSS Guide

Changing the look and feel of a Sharepoint site using Cascading Style Sheets can be confusing for system admins, content managers, and other non-developers. Here's a guide that shows what each entry in OWS.CSS does with graphical elements displayed for easy reference.

Update I: Here's a tool for generating CSS on-the-fly. Very useful.