apt_news.py download forced unsandboxed

Bug #2070095 reported by Dominic Raferd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am not sure which package this relates to, but after a recent upgrade from Ubuntu 22.04 to 24.04 LTS I have started seeing messages in syslog like this:

17:29:03 python3[777789]: /usr/lib/python3/dist-packages/uaclient/apt_news.py:207: Warning: W:Download is performed unsandboxed as root as file '/run/ubuntu-advantage/aptnews.json' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
17:29:03 python3[777789]: acq.run()

It seems to me that user _apt lacks write permission for anything in /run, hence the problem. I realise the script is getting round the problem by running unsandboxed instead but this message is ugly.

What I have installed that might be related (I do not have ubuntu-advantage-tools):
# dpkg-query --list|grep -E "^.i.*(news|-pro-|apt).*(amd64|all)"
ii apt 2.7.14build2 amd64 commandline package manager
ii apt-utils 2.7.14build2 amd64 package management related utility programs
ii libapt-pkg6.0t64:amd64 2.7.14build2 amd64 package management runtime library
ii motd-news-config 13ubuntu10 all Configuration for motd-news shipped in base-files
ii python-apt-common 2.7.7ubuntu1 all Python interface to libapt-pkg (locales)
ii python3-apt 2.7.7ubuntu1 amd64 Python 3 interface to libapt-pkg
ii ubuntu-pro-client 32.3~24.04 amd64 Management tools for Ubuntu Pro
ii ubuntu-pro-client-l10n 32.3~24.04 amd64 Translations for Ubuntu Pro Client

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/2070095/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :

I now think this relates to ubuntu-advantage-tools and/or ubuntu pro-client. I do not have ubuntu-advantage-tools installed but I do have ubuntu-pro-client and I have directory /etc/ubuntu-advantage which contains uaclient.conf.

affects: ubuntu → ubuntu-advantage-tools (Ubuntu)
Revision history for this message
Alberto Contreras (aciba) wrote :

Hello, Dominic. Thanks for reporting this. To be able to better assess the root of the problem, could you please collect and share the output of `sudo pro collect-logs`? Please, make sure that no sensitive information (as the pro token) is attached, or making this issue private.

Could you also run `sudo ls -hal /run/ubuntu-advantage/`?

Thanks.

Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :

# pro collect-logs

[info] A new version is available: 32.3.1~24.04
Please run:
    sudo apt install ubuntu-pro-client
to get the latest bug fixes and new features.

# ls -hal /run/ubuntu-advantage/
total 8.0K
drwxr-xr-x 3 root root 100 Jul 4 12:28 .
drwxr-xr-x 36 root root 1.2K Jul 4 12:27 ..
-rw-r--r-- 1 root root 399 Jul 3 16:00 aptnews.json
-rw-r--r-- 1 root root 12 Jul 4 12:28 candidate-version
drwxr-xr-x 2 root root 40 Jul 4 09:47 notices

And after updating ubuntu-pro-client:
# pro collect-logs
#

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.