How to fix broken permissions on an imported space via SQL when permissions page inaccessible

Michael Corvin
Contributor
February 14, 2020

1. I exported a space from our current Confluence Cloud site to import into this Sever site (v 6.12.2). The exported site had the same key ("LUCY") as an existing space on the server site so I had to change it (to "LUCYS")

2. I edited the "entities.xml" file to replace the oldkey with the newkey per the instructions here: https://confluence.atlassian.com/confkb/how-to-copy-or-rename-a-space-in-confluence-169578.html

3. I imported the space as a user with server admin privileges (in group confluence-administrators). However, at the time of import that user was not in "site-admins", the cloud admin group with global access permissions, and that group did not exist yet in the Crowd directory used to authenticate that user). All the user IDs in the server site are, of course, different.

4. I re-indexed the server site.

5. Search found the new space and contents within it BUT the importing, server admin user could not view any of the space contents (pages or attachments). *The permissions page for the imported space also cannot be viewed so permissions cannot be recovered using the Confluence admin pages.*

6. I created "site-admins" group in Crowd and add the importing server admin user to that group. I made sure to sync the directory in Confluence and verified that the user has that group in Confluence. I flushed all caches, rebuilt the ancestor table and re-indexed the site again.

7. The user in site-admins group still cannot see any content in the space and cannot view the space permissions page either.

Since there seems to be no way to fix this from within Confluence I assume it must be fixed by SQL queries to the Confluence database - ? What are the queries I should use and what tables and fields need to be updated, and how, to recover permissions for an admin on the server site so I can then set permissions for the other users?

Thanks!

3 answers

0 votes
Aafiya Saifi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2024

Helo

0 votes
Ha Tran March 15, 2023

I'm running into the same issue @Michael Corvinand I'm with Confluence Data Center v7.19.6.

I'm able to query the Space that I imported from database side but can't access from Confluence even though the Space searchable under Confluence Admin / Space Permission

Any suggestion to solve this issue?

Thanks in advance

Hannah

Michael Corvin
Contributor
March 15, 2023

sorry, no suggestions.

We're punting on Confluence and Atlassian in general.   Good luck with the huge investment in Data Center.   If it gains all the joys and lost functionality of the 'new editing experience' that Cloud has you're going to have your user base screaming bleeping murder...

Ha Tran March 15, 2023

I was able to fix the issue by run this script on database

update public.spacepermissions set permgroupname = 'groupname' (valid group name) WHERE spaceid = spaceid (retrieve from Space table)  and permtype = 'VIEWSPACE';

But I want to avoid touching database

0 votes
Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2020

Hi Michael,

what if you deleted the imported space and reimported it under the new permission settings?

Cheers,

Kirstin

Michael Corvin
Contributor
February 18, 2020

Thanks for your suggestion, but since I cannot access the space at all I can't get to the delete space function...  I *should* be able to as a confluence-administrators user, but the import of the cloud space to our server seems to have broken all permissions.  I could delete the space from the database, which is how I probably will have to fix this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events