How to do a massive insert into SPACEPERMISSIONS table in confluence 3.4.5?

Hi All, this maybe an stupid question, but I'm stuck with this.

We have an old installation of confluence 2.7 and we need to migrate some users from this installation to our newest (3.4.5).

The issue is, we a large number of users, and a very large number of them as permissions over several sites, but not in the form:


They have permissions directly granted to their users for several spaces.

I was looking at the confluence tables and found that the SPACEPERMISSIONS table takes care of this situation.

When I want to do a massive insert, I found that the column PERMID needs to get his value from somewhere, but I dont know from where, because I dont see any sequence or something like that.

Can anybody help me with this?

Thanks in advance!

1 answer

1 accepted

0 votes
Accepted answer

I don't know about direct database update for this, but the Confluence Command Line Interface does have actions for dealing with adding and removing permissions using standard Confluence remote apis.

Hi Bob!

Yes, I'm using your plugin for several tasks, but for this one I was thinking to direct update the DB. If I don't get the right way to do that, I'm going to use the CLI.

By the way, you did a great job with the plugin, thank you very much!

Hi Bob, I tried to implement your solution, but I'm facing the following error:

Remote error: com.atlassian.confluence.rpc.NotPermittedException: Not permitted to add space permissions

I tried with this line:

./ --action addPermissions --space "IT001" --permissions CREATEATTACHMENT --userId "gaston"

So, It's correct to understand that this particular process is not supported by the remote API?

Thanks in advance!

Never mind. My mistake was to try to set permissions based on the space title not the space key.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,100 views 17 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you