Qrexec PolicySyntaxError: "not a file"

Hi everyone,

My global clipboard in Qubes OS stopped working — Ctrl+Shift+C (copy) works fine, but Ctrl+Shift+V (paste) doesn’t do anything.

I read on the forum that this issue can sometimes be caused by an error in qrexec policy files.

When I check the service status with:

systemctl status qubes-qrexec-policy-daemon.service

I get this error:

qrexec.exc.PolicySyntaxError: /etc/qubes/policy.d/90-admin-policy-default.policy:16: not a file: /etc/qubes/policy.d/include/admin-policy-ro

Previously, I had similar syntax errors in some lower lines of the same file,
but I think I managed to fix them correctly.
Now, this is the only remaining error that still shows up every time I restart the service.

The line 16 in my file looks like this:

##  - include/admin-global-rwx (services to modify global parameters)

I’m not sure how to properly fix or edit this line so that the daemon can start successfully.

Could anyone please advise me:

  • how to fix this remaining policy syntax error properly,
  • or if it would be easier to restore the default Qubes policy files (in case some of them are broken)?
    If so, what would be the safest and easiest way to do that?
    I’m using Qubes 4.2 .

Thank you very much for any help and guidance!

Are you using Qubes Policy Editor? Maybe it will tell where is the error.

1 Like

Thanks for the reply!

Yes, I tried running the Qubes Policy Editor (with sudo qubes-policy-editor in dom0).
It did open, but instead of the graphical window, it only showed a black text screen in the terminal (looked like nano).
So I couldn’t really see where the error is highlighted.

Do you mean that the Policy Editor GUI should show the exact line with the syntax problem?
If yes, maybe it’s not running correctly in my system.
Is there another way to make it display the specific error location (or check the syntax manually)?

You can open Qubes Policy Editor from the Qubes app menu (Q icon). qubes-policy-editor is a distinct program. In both programs, when trying to save the file, you should get a useful error if present.

You can try to use the first method presented in the link from the documentation to get a possible error

Could you provide the full content of the file?

Okay, thank you very much for your reply!
Following your instructions, I created a new policy file (30) and it worked.
There were still some errors in the 90 policy file, but I managed to edit and fix them.
Thanks again! :pray:

1 Like