Page MenuHomePhabricator

Get en exception when set policy.allow-public to true
Closed, DuplicatePublic


I get this after set policy.allow-public to true:

Specified file PHID-FILE-77himeeqwvmm3d3hxuo3 has policy "users" but should have policy "public".

The file is custom phabricator logo

Event Timeline

egig raised the priority of this task from to Needs Triage.
egig updated the task description. (Show Details)
egig added a subscriber: egig.

I think this isn't quite a duplicate of T4214: Allow installs to change or supplement the "Phabricator" icon. I just had my entire Phab site break when I attempted to update policy.allow-public. A Phriction page that we had set to public was still asking users to login in order to view the page, so I tried toggling policy.allow-public from true to false and back to true again just to see if it would reset anything.

As soon as I made the first change, no page would load. They all produced the exception described in this ticket, with the PHID of my custom phabricator logo. Changing policy.allow-public back to true via the command line (sudo bin/config set policy.allow-public true) didn't solve it, but a quick and dirty fix I did discover is this:

bin/policy unlock PHID-FILE-abcdedfghikklmnop. For you, this would be bin/policy unlock PHID-FILE-77himeeqwvmm3d3hxuo3. The std-out for that command was

Unlocking: F27: SunPhabLogo.png
Unlocked view policy.
Edit policy is not mutable.
Saved object.

which doesn't sound like it changed much but it seems to have reset things enough to get them working again.

We list this in the config for ui.custom-header:

As this feature is experimental, please read T4214 for up to date information.

Basically, if we resolve T4214, then that essentially means the feature is complete and bug free. So merging all issues into that task makes the most sense to us so when we do go to resolve the task, all issues are known.

Or maybe I'm not understanding the issue, it sounds like this is still a custom-header issue?

I got the same issue. Fixed it by manually updating the database entry for the ui.custom-header file.

  1. Connect to your mysql database
  2. update phabricator_file.file set viewPolicy = 'public' where phid = 'PHID-FILE-77himeeqwvmm3d3hxuo3';