Hi Mike,
This is just a repeat of the email I sent earlier today for those reading the thread in the forums.
I’ve researched this and I think I’ve found the issue. It looks like I need to set permissions on the folders when they are created. Of course, this won’t address the permissions issues for files that were already created in order to do this, we’ll have to execute a few scripts. Be sure to back your database up before you execute the following scripts, since the second script will update the permissions table.
First, start by retrieving the AdministratorRoleId for your current portal by executing the following script:
SELECT PortalName, AdministratorRoleId from {databaseOwner}{objectQualifier}Portals
Remember the AdministratorRoleId for use below.
Next copy the following script and change the ??? to equal the AdministratorRoleId you recorded above. Additionally, change the lines that contain the string ‘images/%’ to be more specific if you want to update the permissions only for a subset of folders created by WLW. The following script will allow read access to everyone and read and write access to the Administrator role for your portal.
--***** Begin Script *****
DECLARE @AdministratorRoleID int
SELECT @AdministratorRoleID = ???
INSERT INTO {databaseOwner}{objectQualifier}FolderPermission
(FolderID, PermissionID, AllowAccess, RoleID)
SELECT f.FolderID, 5 AS PermissionID, 1 AS AllowAccess, -1 AS RoldID
FROM {databaseOwner}{objectQualifier}Folders AS f LEFT OUTER JOIN
{databaseOwner}{objectQualifier}FolderPermission AS fp ON f.FolderID
= fp.FolderID AND fp.RoleID = -1
WHERE (fp.FolderID IS NULL) AND (f.FolderPath LIKE 'images/%')
INSERT INTO {databaseOwner}{objectQualifier}FolderPermission
(FolderID, PermissionID, AllowAccess, RoleID)
SELECT f.FolderID, 5 AS PermissionID, 1 AS AllowAccess, @AdministratorRoleID AS RoldID
FROM {databaseOwner}{objectQualifier}Folders AS f LEFT OUTER JOIN
{databaseOwner}{objectQualifier}FolderPermission AS fp ON f.FolderID
= fp.FolderID AND fp.PermissionID = 5 AND fp.RoleID = @AdministratorRoleID
WHERE (fp.FolderID IS NULL) AND (f.FolderPath LIKE 'images/%')
INSERT INTO {databaseOwner}{objectQualifier}FolderPermission
(FolderID, PermissionID, AllowAccess, RoleID)
SELECT f.FolderID, 6 AS PermissionID, 1 AS AllowAccess, @AdministratorRoleID AS RoldID
FROM {databaseOwner}{objectQualifier}Folders AS f LEFT OUTER JOIN
{databaseOwner}{objectQualifier}FolderPermission AS fp ON f.FolderID
= fp.FolderID AND fp.PermissionID = 6 AND fp.RoleID = @AdministratorRoleID
WHERE (fp.FolderID IS NULL) AND (f.FolderPath LIKE 'images/%')
--***** Begin Script *****
HTH,
Don