unnecessarily restrictive permissions on /var/log/apt/term.log

Bug #404724 reported by Martin-Éric Racine
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: apt

While writing an Apport hook for 'upgrade-system', I needed to include the APT log, which I've implemented using:

def add_info(report):
        attach_file_if_exists(report, '/var/log/apt/term.log', 'AptLog')

However, this fails with an:

Error: [Errno 13] permission denied: /var/log/apt/term.log

Sure enough, permissions seem to be:

-rw------- 1 root root 86K 2009-07-25 12:18 /var/log/apt/term.log

Is there any rationale for not making this 644 instead? If there is, how is someone supposed to implement the attachment of the log file, then?

ProblemType: Bug
Architecture: i386
Dependencies:
 libgcc1 1:4.3.3-5ubuntu4
 gcc-4.3-base 4.3.3-5ubuntu4
 libstdc++6 4.3.3-5ubuntu4
 findutils 4.4.0-2ubuntu4
 libc6 2.9-4ubuntu6
DistroRelease: Ubuntu 9.04
Package: apt 0.7.20.2ubuntu6
ProcEnviron:
 PATH=(custom, user)
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: apt
Uname: Linux 2.6.28-13-generic i686

Related branches

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Would any ubuntu-core-dev have any answer to this one?

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Please don't subscribe ubuntu-core-dev to bugs. It will send a mail to every individual Ubuntu Core Developer.

Changed in apt (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
ariel (garcia) wrote :

Sorry guys, you subscribed the wrong "Core Devs" group (https://launchpad.net/~gemfony), perhaps the same name but belonging to another Launchpad project.

I will unsubscribe us now, you might want to check for the right groups to subscribe instead.

Colin Watson (cjwatson)
Changed in apt (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Michael Vogt (mvo)
Revision history for this message
Michael Vogt (mvo) wrote :

This should be striaghtforward to fix by changing the permissions to root.adm and 0644. I tag it bitesize, if someone is interessted in this, please contact me, I will be happy to assist with fixing the issue.

Changed in apt (Ubuntu):
importance: Undecided → Medium
assignee: Michael Vogt (mvo) → nobody
tags: added: bitesize
Changed in apt (Ubuntu):
status: Confirmed → Triaged
Michael Vogt (mvo)
Changed in apt (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.6 KiB)

This bug was fixed in the package apt - 0.8.15ubuntu1

---------------
apt (0.8.15ubuntu1) oneiric; urgency=low

  * merged from debian-unstable, remainging changes:
    - use ubuntu keyring and ubuntu archive keyring in apt-key
    - run update-apt-xapian-index in apt.cron
    - support apt-key net-update and verify keys against master-keyring
    - run apt-key net-update in cron.daily
    - different example sources.list

apt (0.8.15) unstable; urgency=low

  [ Julian Andres Klode ]
  * apt-pkg/depcache.cc:
    - Really release action groups only once (Closes: #622744)
    - Make purge work again for config-files (LP: #244598) (Closes: #150831)
  * apt-pkg/acquire-item.cc:
    - Reject files known to be invalid (LP: #346386) (Closes: #627642)
  * debian/apt.cron.daily:
    - Check power after wait, patch by manuel-soto (LP: #705269)
  * debian/control:
    - Move ${shlibs:Depends} to Pre-Depends, as we do not want APT
      unpacked if a library is too old and thus break upgrades
  * doc/apt-key.8.xml:
    - Document apt-key net-update (LP: #192810)

  [ Christian Perrier ]
  * Galician translation update (Miguel Anxo Bouzada). Closes: #626505
  * Italian translation update (Milo Casagrande). Closes: #627834
  * German documentation translation update (Chris Leick). Closes: #629949
  * Catalan translation update (Jordi Mallach). Closes: #630657

  [ David Kalnischkies ]
  * fix a bunch of cppcheck warnings/errors based on a patch by
    Niels Thykier, thanks! (Closes: #622805)
  * apt-pkg/depcache.cc:
    - really include 'rc' packages in the delete count by fixing a
      typo which exists since 1999 in the source… (LP: #761175)
    - if critical or-group can't be satisfied, exit directly.
  * apt-pkg/acquire-method.cc:
    - write directly to stdout instead of creating the message in
      memory first before writing to avoid hitting limits
    - fix order of CurrentURI and UsedMirror in Status() and Log()
  * apt-pkg/orderlist.cc:
    - let VisitRProvides report if the calls were successful
  * apt-pkg/deb/dpkgpm.cc:
    - replace obsolete usleep with nanosleep
    - remove invalid pkgcache.bin and rebuild it if possible
    - log reinstall commands in history.log
  * debian/apt{,-utils}.symbols:
    - update both experimental symbol-files to reflect 0.8.14 state
  * debian/rules:
    - remove unused embedded jquery by doxygen from libapt-pkg-doc
  * cmdline/apt-mark.cc:
    - reimplement apt-mark in c++
    - provide a 'showmanual' command (Closes: #582791)
    - provide a 'dpkg --set-selections' wrapper to set/release holds
  * cmdline/apt-get.cc:
    - deprecate mostly undocumented 'markauto' in favor of 'apt-mark'
  * cmdline/apt-cache.cc:
    - deprecate mostly undocumented 'showauto' in favor of 'apt-mark'
  * apt-pkg/pkgcache.cc:
    - really ignore :arch in FindPkg() in non-multiarch environment
  * doc/po/de.po:
    - undo the translation of the command 'dump' in manpage of apt-config
      as report by Burghard Grossmann on debian-l10n-german, thanks!
  * apt-pkg/deb/debmetaindex.cc:
    - do not download TranslationIndex if no Translation-* will be
      downloaded later on anyway (Closes: #624218)
  * test/versions.lst:
    -...

Read more...

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers