Dashboard Permissions not working or I'm missing

Hi, I’m using RT 5 and I’ve create a system dashboard for the RT at a glance page. When another user logs in, including the root user, it says “Either you have no rights to view saved search RT::User-27-SavedSearch-25 or identifier is incorrect”.

I’ve been through and added the view saved searches and view system dashboards for both groups and users but it still shows this. Any idea how to fix it?

Also have an issue with subscription emails not being sent out, just doesn’t work. I have the cronjob in place, but nothing sends. Thanks.

It looks like you’re actually saving the saved search to the privacy of user 27, not RT->System. Can you double check that?

Also have an issue with subscription emails not being sent out, just doesn’t work. I have the cronjob in place, but nothing sends. Thanks.

Do you see any logging if you manually run the cron command?

Hi Knation,

Thanks for the info. My eyes wondered and I missed that setting. The other user can now see the saved search, but not the “RT System’s dashboards”, which gives a similar error. The dashboards are in the RT System’s dashboards and they should have perms to view it; point me in the right direction?

Will check the email log…

When I run:

/opt/rt5/sbin/rt-email-digest -m daily

The log only shows:

[4338] [Fri Dec 4 11:45:52 2020] [warning]: Running with the internal HTML converter can result in performance issues with some HTML. Install one of the following utilities with your package manager to improve performance with an external tool: w3m, elinks, links, html2text, lynx (/opt/rt5/sbin/…/lib/RT/Interface/Email.pm:1484)

Updating the dashboards with the new saved searches made them work with all users.

For the subscription, if you go to your dashboard and confirm you’re subscriber, and messages are scheduled For today. Are there also tickets shown when viewing that dashboard?

Hi, yep checked that I’m a subscriber, messages are down for weekdays and tickets are shown if you press the show button top right.

Cron looks to be running it as it should too:

Dec 4 13:00:01 RequestTracker CRON[4788]: (root) CMD (root /opt/rt5/sbin/rt-email-dashboards)

My mistake the script you want to run is:

sbin/rt-email-dashboards --dryrun --all

This is the reply:

Dashboard: Open Tickets 1
Subscription Owner: ME
Recipient: <MYEMAIL>
Dashboard: Open Tickets 2
Subscription Owner: ME
Recipient: <MYEMAIL>

Don’t really have 2, just changed the name of them. Nothing showed in the log with that command.
If I remove the dryrun part, it actually works and sends the email and log looks fine for that.

Can you confirm cron is running that job and has the correct Linux rights?

The syslog displays the following when I run it manually:

Dec 4 14:39:26 RequestTracker msmtp: host=HOST tls=off auth=off from=EMAIL recipients=EMAIL mailsize=402576 smtpstatus=250 smtpmsg=‘250 2.0.0 OK 01d6ca4b40deb3d60000ac51’ exitcode=EX_OK
Dec 4 14:39:26 RequestTracker RTmailer: CALL /usr/bin/msmtp -nt -oi -t RETURNED 0

This is what it displays when it runs via cron:

Dec 4 14:41:01 RequestTracker CRON[4929]: (root) CMD (root /opt/rt5/sbin/rt-email-dashboards --all)
Dec 4 14:41:01 RequestTracker CRON[4928]: (CRON) info (No MTA installed, discarding output)

I’m running both as root user. File is owned by www-data. I’ve tried changing root for www-data in the crontab but same result.

I wonder if cron is trying to send email output about an error but no MTA is installed, can you pipe the output to a log and check it?

0 3 * * * cmd >> /some/log/file 2>&1

Log:

/bin/sh: 1: root: not found

Can you share your cronjob entry?

Yes, sorry was just going to:

0 * * * * root /opt/rt5/sbin/rt-email-dashboards --all >> /root/rt.log 2>&1

Is this using /etc/cron.d/ or crontab?

crontab -e

(text for 20 char min)

Crontab runs in the context of the user it is for, so you shouldn’t include “root” in the above command.

Snap. Here: 18.04 - cronjob says "/bin/sh: 1: root: not found" - Ask Ubuntu

Removed root from cron entry and it sends the email.