Bug 748367

Summary: [abrt] anaconda-13.21.146-1.el6: __init__.py:846:_open:IOError: [Errno 13] Permission denied: '/tmp/anaconda.log'
Product: Red Hat Enterprise Linux 6 Reporter: Michal Nowak <mnowak>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team>
Severity: low Docs Contact:
Priority: low    
Version: 6.2CC: ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4f9865a534ef834a62f99f85b358f8b8e487201e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-10 00:11:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michal Nowak 2011-10-24 09:25:42 UTC
abrt version: 2.0.5
cmdline:        
executable:     /usr/sbin/anaconda
kernel:         2.6.32-211.el6.x86_64
reason:         __init__.py:846:_open:IOError: [Errno 13] Permission denied: '/tmp/anaconda.log'
time:           Mon Oct 24 11:15:17 2011
uid:            500
username:       newman

sosreport.tar.xz: Binary file, 2092736 bytes

backtrace:
:__init__.py:846:_open:IOError: [Errno 13] Permission denied: '/tmp/anaconda.log'
:
:Traceback (most recent call last):
:  File "/usr/sbin/anaconda", line 620, in <module>
:    import anaconda_log
:  File "/usr/lib/anaconda/anaconda_log.py", line 105, in <module>
:    logger = AnacondaLog()
:  File "/usr/lib/anaconda/anaconda_log.py", line 57, in __init__
:    autoLevel=False, minLevel=logging.DEBUG)
:  File "/usr/lib/anaconda/anaconda_log.py", line 81, in addFileHandler
:    logfileHandler = logging.FileHandler(file)
:  File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
:    StreamHandler.__init__(self, self._open())
:  File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
:    stream = open(self.baseFilename, self.mode)
:IOError: [Errno 13] Permission denied: '/tmp/anaconda.log'
:
:Local variables in innermost frame:
:self: <logging.FileHandler instance at 0x1f36878>

comment:
:Execute `anaconda` as a user and w/o write access to /tmp/anaconda.log (or /tmp/program.log, /tmp/storage.log, /dev/tty3):
:
:$ ll /tmp/anaconda.log 
:-rw-r--r--. 1 root root 1590 Oct 24 11:15 /tmp/anaconda.log

Comment 2 Ales Kozumplik 2011-10-24 12:12:10 UTC
(In reply to comment #0)
> comment:
> :Execute `anaconda` as a user and w/o write access to /tmp/anaconda.log (or
> /tmp/program.log, /tmp/storage.log, /dev/tty3):

And why do you do that?

Comment 3 Michal Nowak 2011-10-24 12:46:58 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > comment:
> > :Execute `anaconda` as a user and w/o write access to /tmp/anaconda.log (or
> > /tmp/program.log, /tmp/storage.log, /dev/tty3):
> 
> And why do you do that?

I randomly executed `anaconda' as a user and by sheer luck there were files in /tmp owned by root and inaccessible for the user. When I deleted all those stray /tmp files, `anaconda' failed with: IOError: [Errno 13] Permission denied: '/dev/tty3'.

Comment 5 Chris Lumens 2011-11-10 00:11:01 UTC
anaconda is set up to be run either from the loader environment, or via the liveinst script run from the live environment.  It should not be run as a normal user.