# Permission problem when importing metadata

**URL:** <https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515>\
**Category:** Support - Assistance technique\
**Created:** [25 February 2015 02:21 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515 "2015-02-25T02:21:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [25 February 2015 02:21 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515/1 "2015-02-25T02:21:52Z")

</div>

Hello,

I’ve made a full metadata export from a 2.17 snapshot, and am trying to import into a 2.18 database.

I let DHIS2 create an empty database. Then logging in as admin/district, I get messages like those below when trying to import. Any suggestions?

Permission denied, you are not allowed to create objects of type class org.hisp.dhis.dataset.Section

Permission denied, you are not allowed to create objects of type class org.hisp.dhis.validation.ValidationRule

Permission denied, you are not allowed to create objects of type class org.hisp.dhis.user.User

> **···**
>
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [25 February 2015 02:50 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515/2 "2015-02-25T02:50:36Z")

</div>

> I let DHIS2 create an empty database. Then logging in as admin/district, I  
> get messages like those below when trying to import. Any suggestions?
> 
> Permission denied, you are not allowed to create objects of type class  
> org.hisp.dhis.dataset.Section  
> Permission denied, you are not allowed to create objects of type class  
> org.hisp.dhis.validation.ValidationRule  
> Permission denied, you are not allowed to create objects of type class  
> org.hisp.dhis.user.User

I seemed to have resolved this issue through first importing just orgunits,  
then creating another user as Superuser and using that user for importing.

Knut

> **···**
>
> On Wed, Feb 25, 2015 at 8:51 AM, Knut Staring \<knutst@gmail.com\> wrote:
> 
> > --  
> > Knut Staring  
> > Dept. of Informatics, University of Oslo  
> > Norway: +4791880522  
> > Skype: knutstar  
> > [http://dhis2.org](http://dhis2.org)
> 
> --  
> Knut Staring  
> Dept. of Informatics, University of Oslo  
> Norway: +4791880522  
> Skype: knutstar
> 
> > **[Home - DHIS2](https://dhis2.org/)**
> >
> > Collect, visualize and analyze your data with DHIS2, the world's largest health information management system, a global public good.

---

<div class="post-metadata">

**Author:** ![aadeyomoye](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@aadeyomoye](https://community.dhis2.org/u/aadeyomoye)\
**Post date:** [25 February 2015 06:16 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515/3 "2015-02-25T06:16:08Z")

</div>

Then it might mean that the admin/district does not have full Import/Export right which is completely rare if not tampered with from inception. It actually lists that the user does not have access to create data set section, validation rule and user‎. You are probably trying to import items you don’t have access to create.

Regards.

Sent from my BlackBerry 10 smartphone.

> **···**
>
> On Wed, Feb 25, 2015 at 8:51 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > 
> 
> > I let DHIS2 create an empty database. Then logging in as admin/district, I get messages like those below when trying to import. Any suggestions?
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.dataset.Section
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.validation.ValidationRule
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.user.User
> 
> I seemed to have resolved this issue through first importing just orgunits, then creating another user as Superuser and using that user for importing.
> 
> Knut
> 
> > Knut Staring
> 
> > Dept. of Informatics, University of Oslo
> 
> > Norway: +4791880522
> 
> > Skype: knutstar
> 
> > [http://dhis2.org](http://dhis2.org)
> 
> > –
> 
> –  
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [25 February 2015 06:19 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515/4 "2015-02-25T06:19:15Z")

</div>

Thanks, but this is probably rather linked to the fact that in an empty database, the admin superuser is not linked to any OrgUnit. So you first have to import orgunits and then link the admin user to the root, or probably better create another Superuser and rather log in as the new user before importing the rest of the metadata.

> **···**
>
> On Wed, Feb 25, 2015 at 12:46 PM, [deemoyes@yahoo.com](mailto:deemoyes@yahoo.com) wrote:
> 
> > Then it might mean that the admin/district does not have full Import/Export right which is completely rare if not tampered with from inception. It actually lists that the user does not have access to create data set section, validation rule and user‎. You are probably trying to import items you don’t have access to create.
> 
> > 
> 
> > Regards.
> 
> > 
> 
> > Sent from my BlackBerry 10 smartphone.
> 
> > **From:** Knut Staring
> 
> > **Sent:** Wednesday, 25 February 2015 03:51
> 
> > **To:** [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)
> 
> > **Subject:** Re: [Dhis2-users] Permission problem when importing metadata
> 
> > 
> 
> > 
> 
> –  
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)
> 
> On Wed, Feb 25, 2015 at 8:51 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > 
> 
> > I let DHIS2 create an empty database. Then logging in as admin/district, I get messages like those below when trying to import. Any suggestions?
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.dataset.Section
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.validation.ValidationRule
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.user.User
> 
> I seemed to have resolved this issue through first importing just orgunits, then creating another user as Superuser and using that user for importing.
> 
> Knut
> 
> > Knut Staring
> 
> > Dept. of Informatics, University of Oslo
> 
> > Norway: +4791880522
> 
> > Skype: knutstar
> 
> > [http://dhis2.org](http://dhis2.org)
> 
> > –
> 
> –  
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)
> 
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)

---

<div class="post-metadata">

**Author:** ![aadeyomoye](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@aadeyomoye](https://community.dhis2.org/u/aadeyomoye)\
**Post date:** [25 February 2015 06:26 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515/5 "2015-02-25T06:26:58Z")

</div>

Oh true, database is empty. But once you have imported the org units already, the importer becomes the creator of the org units. This should still allow the admin/district ‎should be allowed to import more. But of course, another thing we need to check is that there has to be data elements in place before we can create validation rules too.

Maybe that explains why there is no access validation rule also.

Regards,

Adedayo

Sent from my BlackBerry 10 smartphone.

> **···**
>
> On Wed, Feb 25, 2015 at 12:46 PM, [deemoyes@yahoo.com](mailto:deemoyes@yahoo.com) wrote:
> 
> > Then it might mean that the admin/district does not have full Import/Export right which is completely rare if not tampered with from inception. It actually lists that the user does not have access to create data set section, validation rule and user‎. You are probably trying to import items you don’t have access to create.
> 
> > 
> 
> > Regards.
> 
> > 
> 
> > Sent from my BlackBerry 10 smartphone.
> 
> > **From:** Knut Staring
> 
> > **Sent:** Wednesday, 25 February 2015 03:51
> 
> > **To:** [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)
> 
> > **Subject:** Re: [Dhis2-users] Permission problem when importing metadata
> 
> > 
> 
> > 
> 
> –  
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)
> 
> On Wed, Feb 25, 2015 at 8:51 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > 
> 
> > I let DHIS2 create an empty database. Then logging in as admin/district, I get messages like those below when trying to import. Any suggestions?
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.dataset.Section
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.validation.ValidationRule
> 
> > Permission denied, you are not allowed to create objects of type class org.hisp.dhis.user.User
> 
> I seemed to have resolved this issue through first importing just orgunits, then creating another user as Superuser and using that user for importing.
> 
> Knut
> 
> > Knut Staring
> 
> > Dept. of Informatics, University of Oslo
> 
> > Norway: +4791880522
> 
> > Skype: knutstar
> 
> > [http://dhis2.org](http://dhis2.org)
> 
> > –
> 
> –  
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)
> 
> Knut Staring
> 
> Dept. of Informatics, University of Oslo
> 
> Norway: +4791880522
> 
> Skype: knutstar
> 
> [http://dhis2.org](http://dhis2.org)

---

<div class="post-metadata">

**Author:** ![Lars](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lars/32/34166_2.png) [@Lars](https://community.dhis2.org/u/Lars)\
**Post date:** [25 February 2015 09:26 UTC](https://community.dhis2.org/t/permission-problem-when-importing-metadata/2515/6 "2015-02-25T09:26:18Z")

</div>

Hi,

can you check if the user you are logged in as have authority to create  
these objects? If you are working with meta-data on a system you have  
"ownership" to its easier to log in as a user with the ALL authority.

Lars
