Cannot Edit Restrictions on Confluence Tools > Restrictions, Stack Trace 'execute User with name '[User]' not found, but page permissions still exist on: page: [PageName]' due to nonexistent user

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

問題

When trying to modify an existing Restriction, under Tools > Restrictions, the following error is thrown:

2013-08-06 11:44:12,876 WARN [http-8090-2] [confluence.pages.actions.GetPagePermissionsAction] execute User with name 'RemovedUser' not found, but page permissions still exist on: page: Test Page (106702962)
 -- space: 44269570 | url: /pages/getpagepermissions.action | page: 106702962 | userName: admin | referer: http://192.168.10.101:8090/pages/viewpage.action?pageId=106702962 | action: getpagepermissions

原因

There is a user entry in CONTENT PERM table that does not exist on the confluence user base. That will cause the above stack trace to appear.

Diagnosis:

To find those users that belong to restrictions that are no longer in Confluence Users run below one of the below queries:

-- From Confluence 5.2.3 to latest
SELECT * FROM CONTENT_PERM cp inner join CONTENT_PERM_SET cps on cp.CPS_ID=cps.ID
WHERE USERNAME NOT IN (SELECT user_key FROM user_mapping);

-- Prior Confluence 5.2.3
SELECT * FROM CONTENT_PERM cp inner join CONTENT_PERM_SET cps on cp.CPS_ID=cps.ID 
WHERE USERNAME NOT IN (SELECT user_name FROM cwd_user);

 

ソリューション

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  1. Confluence をシャットダウンします。
  2. Go to your Database and Run the following queries:

    -- From Confluence 5.2.3 to latest
    delete from CONTENT_PERM where USERNAME NOT IN (SELECT user_key FROM user_mapping);
    delete from CONTENT_PERM_SET where ID NOT IN (select CPS_ID from CONTENT_PERM);
    
    -- Prior Confluence 5.2.3
    delete from CONTENT_PERM where USERNAME NOT IN (SELECT user_name FROM cwd_user);
    delete from CONTENT_PERM_SET where ID NOT IN (select CPS_ID from CONTENT_PERM);
  3. Confluence を再起動します。
  4. Check if the error messages are gone.

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.