Bug 1138991 - [abrt] virt-manager: __init__.py:925:_open:IOError: [Errno 13] Permission denied: '/home/brisco/.virt-manager/virt-manager.log'
Summary: [abrt] virt-manager: __init__.py:925:_open:IOError: [Errno 13] Permission den...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:4a94b161fcec813b20d76bea039...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-07 09:46 UTC by Thomas Brisco
Modified: 2014-09-08 14:53 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-09-08 14:53:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.15 KB, text/plain)
2014-09-07 09:47 UTC, Thomas Brisco
no flags Details
File: dso_list (73 bytes, text/plain)
2014-09-07 09:47 UTC, Thomas Brisco
no flags Details
File: environ (3.34 KB, text/plain)
2014-09-07 09:47 UTC, Thomas Brisco
no flags Details

Description Thomas Brisco 2014-09-07 09:46:58 UTC
Description of problem:
Run virt-manager from the CLI with my standard login (i.e. not root)

Version-Release number of selected component:
virt-manager-0.10.0-5.fc19

Additional info:
reporter:       libreport-2.2.2
cmdline:        /usr/bin/python /usr/share/virt-manager/virt-manager
executable:     /usr/share/virt-manager/virt-manager
kernel:         3.14.17-100.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
__init__.py:925:_open:IOError: [Errno 13] Permission denied: '/home/brisco/.virt-manager/virt-manager.log'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager", line 303, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager", line 194, in main
    cliutils.setup_logging("virt-manager", options.debug)
  File "/usr/share/virt-manager/virtcli/cliutils.py", line 64, in setup_logging
    FILE_MODE, MAX_LOGSIZE, ROTATE_NUM)
  File "/usr/lib64/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.7/logging/__init__.py", line 902, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/brisco/.virt-manager/virt-manager.log'

Local variables in innermost frame:
self: <logging.handlers.RotatingFileHandler object at 0x2460110>

Comment 1 Thomas Brisco 2014-09-07 09:47:00 UTC
Created attachment 935123 [details]
File: backtrace

Comment 2 Thomas Brisco 2014-09-07 09:47:01 UTC
Created attachment 935124 [details]
File: dso_list

Comment 3 Thomas Brisco 2014-09-07 09:47:02 UTC
Created attachment 935125 [details]
File: environ

Comment 4 Cole Robinson 2014-09-07 15:07:02 UTC
I'm guessing you previously tried to do

su -c `virt-manager`

and the virt-manager.log was created as root. Then attempting to run as a regular user can't access the root owned logfile. Is that correct?

Comment 5 Thomas Brisco 2014-09-07 18:51:23 UTC
I checked the ~/.virt-manager directory, and the virt-manager.log file was indeed owned by root.

I chown'd the files back to my own userid, and the behavior reverted to more reasonable behavior.

Comment 6 Cole Robinson 2014-09-08 14:53:29 UTC
Fixed upstream now:

commit db41d9459f4fed61ff64d075b9be9c7786dbb0b3
Author: Cole Robinson <crobinso>
Date:   Mon Sep 8 10:51:34 2014 -0400

    cli: Don't error if logfile setup fails (bug 1138991)


But since this should be a rare occurence, not really worth the effort of backporting to f19. It'll appear in the next virt-manager release


Note You need to log in before you can comment on or make changes to this bug.