I have not found boot.log in the apport source code, but it is mentioned two package hooks:
grep boot.log /usr/share/apport/ -r /usr/share/apport/package-hooks/source_xorg.py: attach_file_if_exists(report, '/var/log/boot.log', 'BootLog') /usr/share/apport/package-hooks/source_xorg.py: report['xserver.logfile'] = xlog.boot_logfile /usr/share/apport/package-hooks/source_plymouth.py: attach_file(report, '/var/log/boot.log', 'BootLog') They use attach_file or attach_file_if_exists. They need to use root_command_output instead. ** Package changed: apport (Ubuntu) => plymouth (Ubuntu) ** Also affects: xorg (Ubuntu) Importance: Undecided Status: New ** Changed in: plymouth (Ubuntu) Status: New => Triaged ** Changed in: xorg (Ubuntu) Status: New => Triaged ** Changed in: plymouth (Ubuntu) Importance: Undecided => Medium ** Changed in: xorg (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to xorg in Ubuntu. https://bugs.launchpad.net/bugs/2041737 Title: apport-collect permission error on retrieving boot.log Status in plymouth package in Ubuntu: Triaged Status in xorg package in Ubuntu: Triaged Bug description: RE: Bug Report: https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/2041736 While reviewing this Bug Report, to add a comment to help explain something for this user, i noticed this error from apport collect: ... BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log' ... This file is needed by Launchpad for diagnostics. Just this week, I helped a Forum user review his boot.log files, so I am familiar with this. The permissions and ownership of the boot.log.X files are currently: mafoelffen@Mikes-B460M:~$ ls -l /var/log/boot* -rw------- 1 root root 0 Oct 16 00:00 /var/log/boot.log -rw------- 1 root root 101106 Oct 16 00:00 /var/log/boot.log.1 -rw------- 1 root root 50432 Oct 14 00:00 /var/log/boot.log.2 -rw------- 1 root root 201696 Oct 12 00:00 /var/log/boot.log.3 -rw------- 1 root root 50375 Oct 10 00:00 /var/log/boot.log.4 -rw------- 1 root root 50497 Oct 9 00:00 /var/log/boot.log.5 -rw------- 1 root root 1598 Sep 29 00:00 /var/log/boot.log.6 -rw------- 1 root root 26496 Sep 28 19:10 /var/log/boot.log.7 -rw-r--r-- 1 root root 108494 Apr 19 2022 /var/log/bootstrap.log ... Which means the 'root' is only user that can open or view them. Examples: ... mafoelffen@Mikes-ThinkPad-T520:~/Downloads$ awk 'NR>3{exit} {print $0}' /var/log/boot.log awk: fatal: cannot open file `/var/log/boot.log' for reading: Permission denied mafoelffen@Mikes-ThinkPad-T520:~/Downloads$ sudo awk 'NR>3{exit} {print $0}' /var/log/boot.log ------------ Sat Jul 22 00:27:04 PDT 2023 ------------ [ OK ] Started Show Plymouth Boot Screen. [ OK ] Started Forward Password R…s to Plymouth Directory Watch. ... That is why I think apport-collect is getting permissions errors and failing to retrieve the user boot.log for upload. Expected behavior: apport-collect should upload the boot.log successfully. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: apport 2.20.11-0ubuntu82.5 ProcVersionSignature: Ubuntu 6.2.0-33.33~22.04.1-generic 6.2.16 Uname: Linux 6.2.0-33-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia zfs zunicode zavl icp zcommon znvpair ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: unknown CurrentDesktop: GNOME Date: Sat Oct 28 20:44:58 2023 InstallationDate: Installed on 2021-09-23 (765 days ago) InstallationMedia: Ubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819) PackageArchitecture: all SourcePackage: apport UpgradeStatus: Upgraded to jammy on 2022-08-17 (438 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/2041737/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp