ERROR!- User does not have write access to category option combo

Dear All,
When enter data from user end showing error on one age group (0-5 years)
User does not have write access to category option combo: X0ylwqzbF1Q, errors: [User has no data write access for CategoryOption: Qf7Vput58Qf]
All other age group working fine.

Please need some help.

1 Like

Hi @Mahbubul_Alam, our team from @dhis2-platform will get back to you shortly on this.


Thanks for your reply… We are using DHIS2 2.29 …waiting for your team response…

1 Like

@Mahbubul_Alam, this most likely relates to the new sharing model introduced in 2.29.

if you have access to the back end, run
" UPDATE dataelementcategoryoption SET publicaccess = ‘rwrw----’; "
in postgresql



Thanks @Calle_Hedberg Problem solved…



Hi @Mahbubul_Alam,

So exactly what was the problem, if it wasn’t the dataelementcategoryoption table’s publicaccess setting? Just interesting to know…



1 Like

Hi @Calle_Hedberg , after run this update query, i have to clean the browser cache and it’s worked,…
But form today… the same problem happening again…this time not only 0-5 years, this happening with all fields of all forms.
Please need some urgent help

1 Like

Hi @Mahbubul_Alam,

Kindly Confirm if the Category option, Category and the category combination are shared with the right group.


Hi @jomutsani
I checked, Category option, Category and the category combination are shared with the right group.
All those sharing settings are properly done… but problem not solved yet…


3 posts were split to a new topic: User does not have write access to category option combo

Hi All,
I have the same problem but I have only access as Admin (or superuser).

What should I do please?


1 Like


Have you run
" UPDATE dataelementcategoryoption SET publicaccess = ‘rwrw----’; "
in postgresql?


1 Like

I don’t know how to run it from where ?

I don’t have access to server. I only have access on Admin

Thank you

1 Like


In order to run that script, you need access to the database (so you run the script from the postgresql command line interface, or from e.g. a PGadmin script window).

Since you do not have access to the database, you will have to do the same manually - easy if your database has few Category Options, but a pain if there are many:

  1. Go to Maintenance
  2. Select Category option (listing)
  3. For each Category option, click the menu (three vertical dots) and then Sharing Settings.
  4. Click the setting for public access (left of the two icons)
  5. Select METADATA -> Can Edit and view
  6. Select DATA -> Can capture and view
  7. Close, then continue doing the same with all other Category options.

Doing all of them one-by-one in the UI has the same effect as running the above script in the database itself.

After completing, then

  • Go to Data Administration, select Maintenance, then tick Clear application cache and then “perform maintenance”
  • Run the Browser Cache Cleaner

Then check if your problem has been solved.



For the one interested (or that don’t have access to the db)

I wrote dhis2 taskr recipes to change these permissions via the api.
Dhis2 taskr is custom dhis2 app that allows you run script against the api

const api = await dhis2.api();

const co = await api.get("categoryOptions", { fields: ":all", paging: false });

const results = [];
for (cat of co.categoryOptions) {
  cat.publicAccess = "rwrw----";
  data = {
    meta: { allowPublicAccess: true, allowExternalAccess: false },
    object: cat
  try {
    const share = await
      "sharing?type=categoryOption&id=" +,
  } catch (e) {}

return results;

Hi All,
I Am facing a user does not have write access to the category option combo in version 2,29. Could you support me?


Welcome to the community @Betelhem_simachew! I believe that version 2.29 is very old so wouldn’t it be better if you upgrade to one of the latest releases? Please know; however, that the instructions are very important: Upgrading - DHIS2 Documentation

Many changes since 2.29 so perhaps these issues will be solved, and if not it’ll be easier to solve these issues after the upgrade (as well as know if there’s an actual bug).


@Betelhem_simachew All the solutions were exhausted up there. Unless yours is a special case. We are here to help. Do you have backend access, if not we can use the API method? What’s your take?

1 Like