How to remove all restrictions from a specific page via the database

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

If you'd like to remove page level permissions for a specific page via the database

Solution

  1. Shutdown Confluence

  2. Backup your database

  3. Run below queries to replacing page title and the spaceid you'd like to have the permissions removed from:

    Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

    1 DELETE from CONTENT_PERM WHERE CPS_ID IN (select ID from CONTENT_PERM_SET WHERE CONTENT_ID IN (select CONTENTID from CONTENT where title='page title' and spaceid = 'spaceid where the page is housed'));
    1 DELETE from CONTENT_PERM_SET WHERE CONTENT_ID IN (select CONTENTID from CONTENT WHERE title='page title' and spaceid = 'spaceid where the page is housed');
  4. Start Confluence

Note

Removing single user from the Page Restrictions

Sometimes, we may need to remove single users from the page restrictions via database using the page title and the username which needs to be removed using below query.

1 DELETE from CONTENT_PERM WHERE CPS_ID IN (select ID from CONTENT_PERM_SET WHERE CONTENT_ID IN (select CONTENTID from CONTENT where title='Restrict' and spaceid = 'spaceid where the page is housed')) AND username = (select user_key from user_mapping where lower_username='test');

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.