Microsoft KB Archive/153899

{|
 * width="100%"|

FP1: Upgrading 1.0 Extensions to 1.1 Using Netscape UNIX Servers

 * }

Q153899

-

The information in this article applies to:


 * Microsoft FrontPage for Windows 1.1

-

SYMPTOMS
The Permissions command does not function after you upgrade from FrontPage 1.0 to FrontPage 1.1 when you are using a Netscape UNIX server.

When you upgrade from FrontPage 1.0 to FrontPage 1.1 and if you are using a Netscape UNIX server, the permissions menu may not function on the upgraded Web.

CAUSE
This problem occurs because FrontPage 1.0 does not require an access.cnf file, but FrontPage 1.1 does. The access.cnf file contains server permissions information. This file is not supplied when you upgrade the Web.

RESOLUTION
To work around this problem, run the following UNIX Perl script on each port. This will create the necessary access.cnf files in the root Web and in each sub Web. The script is for use only with Webs running on UNIX Netscape servers, and may be run either before or after the upgrade to 1.1.

MORE INFORMATION
Use the UNIX Perl script provided in this article to create the access.cnf files in the root Web and in each sub Web.

To use the script:


 * 1) Copy the script to your UNIX server and name it "makeAccess" (without the quotation marks).
 * 2) Run makeAccess with no parameters to see the help display on using this script.

You will need to run makeAccess once for each port.

UNIX PERL Script
UNIX PERL Script


 * 1) !/usr/local/bin/Perl

if ($#ARGV != 1) { print STDERR "Usage: makeAccess contentDir serverName\n"; print STDERR "Creates access.cnf file for root Web and each sub Web.\n"; print STDERR "\n"; print STDERR "contentDir is the full path name to the content directory\n"; print STDERR " for the root Web, with no trailing slash.\n"; print STDERR "\n"; print STDERR "serverName is the value of ServerName from the Netscape\n"; print STDERR "server config file in config/magnus.conf\n"; exit 1; }
 * 1) To see the usage message, run makeAccess with no parameters

$contentDir = shift; $serverName = shift;
 * 1) Get command line args

sub createAccess {   local($accessDir, $passwordDir, $realm, $useRealm) = @_;
 * 1) Subroutine to create access.cnf file

$filename = "$accessDir/access.cnf"; if (-s $filename) {       # If there is already a non-empty access.cnf, don't overwrite it        print STDERR "Directory \"$accessDir\" already has a non-empty        access.cnf file\n"; return; }

open(OH, ">$accessDir/access.cnf") || die("Could not open file \"$accessDir/access.cnf\" for writing\n $!"); print OH "RealmName:$realm\n"; if ($useRealm ne '') { print OH "UseRealm:$useRealm\n"; }   print OH "PasswordDir:$passwordDir\n"; close OH; print STDOUT "Created file \"$accessDir/access.cnf\"\n"; }

$pvtDir = "$contentDir/_vti_pvt"; &createAccess($pvtDir, $pvtDir, $serverName, "");
 * 1) Create access.cnf file for the root Web


 * 1) Create access.cnf file for each sub Web

$servicesFile = "$contentDir/_vti_pvt/services.cnf"; open(IH, "$servicesFile") || die("Could not open \"$servicesFile\" for reading\n $!"); @file = ; close(IH);
 * 1) Get list of sub Webs by reading services.cnf

chop(@file);
 * 1) Remove newline from each line

foreach $line (@file) {   $line =~ /(\S+)/; $Webname = $1;
 * 1) Get sub Web name from each line

# Remove first slash $Webname =~ s/^\///;

# Skip empty Web name (root Web or blank line) next if ($Webname eq '');

# Look at .nsconfig file in _vti_adm $nsconfig = "$contentDir/$Webname/_vti_bin/_vti_adm/.nsconfig"; open(IH, "$nsconfig") || die("Could not open \"$nsconfig\" for reading\n $!"); @require = grep(/RequireAuth/, ); close(IH);

# Get the realm value from the RequireAuth line of .nsconfig $req = $require[0]; $req =~ /(realm=\")([^\"]+)(\")/;   $nsrealm = $2;

$accessDir = "$contentDir/$Webname/_vti_pvt";

# If the realm from nsconfig is different from the Web name, # then we inherit permissions from the root Web if ($nsrealm ne $Webname) { $passwordDir = "$contentDir/_vti_pvt"; $realm = $serverName; $useRealm = ""; }   else { $passwordDir = "$contentDir/$Webname/_vti_pvt"; $realm = $Webname; $useRealm = "/$Webname"; }
 * 1) Inherit permissions from root Web
 * 1) Unique permissions for sub Web

&createAccess($accessDir, $passwordDir, $realm, $useRealm); }

The third-party products discussed here are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

Additional query words: front page

Keywords : kb3rdparty kbnetwork kbdta fpext

Issue type : kbprb

Technology : kbvcSearch