Bug 352911 - yumdownloader does not handle not having write permisions to the destination directory
yumdownloader does not handle not having write permisions to the destination ...
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-25 14:12 EDT by Russell Harrison
Modified: 2007-12-26 18:52 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-25 14:28:38 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 Russell Harrison 2007-10-25 14:12:07 EDT
Description of problem:


Version-Release number of selected component (if applicable):
$ rpm -q yum-utils
yum-utils-1.1.7-1.fc7

How reproducible:
cd to a directory where the user does not have write permisions and attempt to
use yumdownloader to download an rpm to that directory

Steps to Reproduce:
$ /var/opt
$ yumdownloader --source wordpress
  
Actual results:
$ yumdownloader --source wordpress
Loading "fastestmirror" plugin
Loading "skip-broken" plugin
Loading "refresh-updatesd" plugin
Loading "fedorakmod" plugin
Loading "kernel-module" plugin
Loading "protectbase" plugin
Loading "priorities" plugin
Loading mirror speeds from cached hostfile
0 packages excluded due to repository protections
0 packages excluded due to repository priority protections
Enabling livna-source repository
0 packages excluded due to repository protections
0 packages excluded due to repository priority protections
Enabling fedora-source repository
0 packages excluded due to repository protections
0 packages excluded due to repository priority protections
Enabling updates-source repository
0 packages excluded due to repository protections
0 packages excluded due to repository priority protections
wordpress-2.2.3-0.fc7.src 100% |=========================|    0 B    00:00     
Traceback (most recent call last):
  File "/usr/bin/yumdownloader", line 215, in <module>
    util = YumDownloader()
  File "/usr/bin/yumdownloader", line 41, in __init__
    self.main()
  File "/usr/bin/yumdownloader", line 71, in main
    self.downloadPackages(opts)
  File "/usr/bin/yumdownloader", line 175, in downloadPackages
    path = repo.getPackage(download)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 629, in getPackage
    cache=cache
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 607, in _getFile
    http_headers=headers,
  File "/usr/lib/python2.5/site-packages/urlgrabber/mirror.py", line 411, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.5/site-packages/urlgrabber/mirror.py", line 397, in
_mirror_try
    return func_ref( *(fullurl,), **kwargs )
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 927, in
urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 845, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 915, in
retryfunc
    fo._do_grab()
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 1196, in
_do_grab
    else: new_fo = open(self.filename, 'wb')
IOError: [Errno 13] Permission denied: u'./wordpress-2.2.3-0.fc7.src.rpm'

Expected results:

yumdownloader should output an error stating it does not have write permissions
to the destination directory, or something similar.

Additional Information:
Also filed the bug upstream in the yum bugzilla.  Bug 846
https://devel.linux.duke.edu/bugzilla/show_bug.cgi?id=846
Comment 1 Seth Vidal 2007-10-25 14:28:38 EDT
fixed in upstream
Comment 2 Fedora Update System 2007-12-07 16:30:30 EST
yum-utils-1.1.9-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'
Comment 3 Fedora Update System 2007-12-07 16:33:39 EST
yum-utils-1.1.9-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'
Comment 4 Fedora Update System 2007-12-23 17:50:21 EST
yum-utils-1.1.9-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'
Comment 5 Fedora Update System 2007-12-23 17:51:05 EST
yum-utils-1.1.9-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'
Comment 6 Fedora Update System 2007-12-26 18:51:51 EST
yum-utils-1.1.9-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2007-12-26 18:52:18 EST
yum-utils-1.1.9-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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