informant: Unable to save read information in informant.dat

On running informant read 0 on first use it returns the following error: ERROR: Unable to save read information, please re-run with correct permissions to access "/var/cache/informant.dat".

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

As of the latest AUR version 0.1.0-2 you should be able to add your user to the “informant” group in order to avoid using sudo.

The reason I recommend the informant group instead of changing the default save location is because of the pacman hook functionality.

When the pacman runs the hook the script (unless I’m mistaken) will be executing as root (or at least as euid 0). It didn’t seem appropriate to me for a system utility to have it’s save data in a user directory.

Other than modifying the script after it’s installed to hard code the user folder I didn’t see a clean way to determine the user’s home directory (as the hook would evaluate ~/.cache/ to /root/.cache/ not the user’s home directory). Then when run standalone by the user informant would have a separate save data from when it’s run as a pacman hook, which in turn could cause pacman to prompt a user to re-read some news items.

It’s a bit weird trying to figure out the default behavior of something like this, as it can run as a system utility (pacman hook) or standalone by a user. Should multi-user systems be considered? Are all users that would use informant expected to have privileges to run pacman to update the system? Currently using the informant group I’m assuming that any user that will run informant standalone understands they will modify the system state and thus effect the behavior of the pacman hook, if users don’t want to modify the system state informant -f <file> should be used instead.

If anyone has better recommendations for default behaviors, or finds I’m incorrect about something I’m open to changing it.

I opened a new shell, but I did not log out from the X session completely nor did I restart, is that necessary?

Yes, even if there are some hacky ways to avoid this it’s the simplest solution to just completely log off the user once.

Changes of a user’s groups only take effect when logging in (you can check by running id) and if you are still within your X session every shell is spawned with the old group settings that were prevalent when you logged into the X session.

The output of groups markus does include informant. groups however, does not. I opened a new shell, but I did not log out from the X session completely nor did I restart, is that necessary?

For clarification: I tested this on a manjaro installation. I plan to switch all of my devices to a plain arch installation and already have it on others, but this is the device I have at hand right now and it is not a plain arch.