Bug 591054 - yum clean all fails with wrong privs
yum clean all fails with wrong privs
Status: CLOSED DUPLICATE of bug 537829
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
12
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-11 06:41 EDT by Julian Leyh
Modified: 2014-01-21 18:14 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-11 10:20:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Julian Leyh 2010-05-11 06:41:40 EDT
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 07:01:41 EDT
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 10:20:32 EDT

*** 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.