Attempts to write in user homedir even if running as root

Bug #10537 reported by Jens Bech Madsen
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aptitude (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

When I run 'sudo aptitude somthing something' I get this message:

E: /home/jbm/.aptitude/config - Unable to open %s for writing (13 Permission denied)

which is logical since my homedir is on an NFS partition on which my local root
user doesn't have write access.

Aptitude shouldn't be writing in my homedir when it's running with root privs.

Revision history for this message
Jens Bech Madsen (jbmadsen) wrote :

*** Bug 10536 has been marked as a duplicate of this bug. ***

Revision history for this message
Michael Vogt (mvo) wrote :

I'll have a look tomorrow

Revision history for this message
Michael Vogt (mvo) wrote :

aptitude will use the "HOME" enviroment to determine where to store it's
config-files. You can run "sudo -H aptitude something". This will modify HOME to
point to root's homedir. I changed the internal use of sudo in aptitude
accordingly and uploaded it as 0.2.16.8-1ubuntu4.

Revision history for this message
Michael Vogt (mvo) wrote :

fixed in the current hoary archive

Revision history for this message
Kim Alvefur (zash) wrote :

This bug seems to be reintroduced in current karmic.

After running sudo aptitude whatever, the permissions on $HOME/.aptitude/config is root:root, 640, so when I run aptitude without as me it can't read the file and uses default permissions and then creates a empty file there.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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