How can we disable the Confluence Space Export?
Asked by Gaj Umapathy:

Hi,

As a Confluence admin, I want to be able to disable HTML and XML exports of space. I can already disable pdf export by disabling the pdf export module in plugins. However, I want to disable HTML and XML exports too but I found that these modules can't be disabled.

![image.png](/t5/image/serverpage/image-id/42792i29452727233E12AA/image-size/large?v=v2&px=999 "image.png")

I thought I will ask here incase someone has done this a nice way.

Please note, I'm not looking for disabling this at space level with space permissions. I want to disable it on the entire site. Reason for this is to address DLP (Data Loss Prevention).

Atlassian says[only pdf can be disabled entirely](https://confluence.atlassian.com/confkb/how-to-restrict-the-ability-to-export-a-space-in-confluence-800699946.html) I'm sure we can do it with some VM file changes maybe.

Gaj


Answers:
author: Bill Bailey
body: How many spaces do you have? I ask because the amount of time to reset the permissions is probably a lot less than trying to come up with a blocking solution.

You have two other solutions:

* White tape approach - write CSS to set those menu items to invisible (visibility:hidden;)
* Find the vm file in Confluence, and remove the link there.

Both of these solutions will take time to implement, and doesn't allow for admins to see the functions.

The cheapest way is to just reset the permissions for existing spaces, since you have already fixed the issue for new spaces.

comments: author: Gaj Umapathy
body: Thanks Bill. We have over 3k spaces but that's not the case as we need a unction to disable this for space admins (and stop space admins adding users or themselves to export space permission). We need only confluence admins to be able to do this.


author: Bill Bailey
body: Holy moly that is a lot of spaces! I take it that each space has a potentially different user specified as a space admin?

I was going to suggest using the REST API, but there is no permission support [CONFSERVER-44329](https://jira.atlassian.com/browse/CONFSERVER-44329)

I think your best bet is the paid plugin [ultimate-permission-manager](https://marketplace.atlassian.com/apps/1214115/ultimate-permission-manager?hosting=server&tab=overview)

Next option that would allow you to automate a lot of admin tasks is [Confluence Command Line Interface (CLI)](https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?hosting=cloud&tab=overview), which does support permission settings - [removePermissions](https://bobswift.atlassian.net/wiki/spaces/CSOAP/pages/91881522/Documentation#Documentation-removePermissions).

Your only other alternative is a custom plugin.


author: Jakub Hanak
body: Hello [@Gaj Umapathy](/t5/user/viewprofilepage/user-id/125553),

What about forbid exporting in Default space permission setting. Then every time you create new space this option will be forbidden and no one will be able to export anything. That might do the trick for you.

Best regards,

Jakub

comments: author: Gaj Umapathy
body: Hi Jakub,

We already have it disabled by default on new spaces. The problem is, space admins still have the ability to allow users to export the space. Some without understanding the consequences allow confluence-users to be able to export space.

We want to disable it entirely and not rely on space admins to disable this per space. With DLP and GDPR i'm sure a lot more users will want this.

Cheers,

Gaj


author: Jakub Hanak
body: I think its not possible to disable it completely, as stated in this topic as wellhttps://community.atlassian.com/t5/Confluence-questions/How-to-set-a-confluence-page-viewable-but-can-not-be-copied/qaq-p/139468

The best way then would be to educate your space admins about the consequences.

Sorry I couldn?t help more.

Best regards,

Jakub


author: Gaj Umapathy
body: I've raised [https://jira.atlassian.com/browse/CONFSERVER-57781.](https://jira.atlassian.com/browse/CONFSERVER-57781.?)

In the meantime I will look at handling this at proxy/LB level to prevent the export of these URLs:

\<confluence_url\>/spaces/flyingpdf/flyingpdf.action?key=\<spacekey\>

\<confluence_url\>/spaces/exportspacehtml.action?key=\<spacekey\>

\<confluence_url\>/spaces/exportspacexml.action?key=\<spacekey\>


author: Tobias Anstett _K15t_
body: Hi [@Gaj Umapathy](/t5/user/viewprofilepage/user-id/125553),

the best approach is to do it on the proxy level as you just mentioned. You might want to consider a redirect instead to the "not permitted action". Additionally you could hide the web-item using css:

```
li[data-web-item-key="export"] { 
  display: none;
}
```

Best, Tobias


Tags: export

permission

space