Bug 591054 - yum clean all fails with wrong privs
Summary: yum clean all fails with wrong privs
Status: CLOSED DUPLICATE of bug 537829
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 12
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-11 10:41 UTC by Julian Leyh
Modified: 2014-01-21 23:14 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-05-11 14:20:32 UTC


Attachments (Terms of Use)

Description Julian Leyh 2010-05-11 10:41:40 UTC
Description of problem:

executing "yum clean all" as a user can lead to crashes caused by permission denials.

Version-Release number of selected component (if applicable):


How reproducible:

execute "yum clean all" with fastestmirror-plugin, which has stuff to clean up (for example /var/cache/yum/timedhosts.txt)
  
Actual results:

crash with python backtrace

Expected results:

yum handling the denial in a less dramatic way

Additional info:

traceback (language set to German):

$ yum clean all
Geladene Plugins: fastestmirror, keys, list-data, presto, refresh-packagekit, remove-with-leaves
Räume alles auf
Cleaning up list of fastest mirrors
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 109, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 356, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 538, in doCommand
    return base.cleanCli(extcmds)
  File "/usr/share/yum-cli/cli.py", line 902, in cleanCli
    self.plugins.run('clean')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 177, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 119, in clean_hook
    os.unlink(hostfilepath)
OSError: [Errno 13] Keine Berechtigung: '/var/cache/yum/timedhosts.txt'

Comment 1 Julian Leyh 2010-05-11 11:01:41 UTC
Steps to reproduce (on clean system):

1. sudo yum install yum-plugin-fastestmirror
2. sudo touch /var/cache/yum/timedhosts.txt
3. yum clean all

Comment 2 James Antill 2010-05-11 14:20:32 UTC

*** This bug has been marked as a duplicate of bug 537829 ***


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