Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On Fedora 13, in /etc/sudoers I used to have a line:

Cmnd_Alias      SOFTWARE=/usr/bin/yum

and then for a user that would have the privilege of installing his/her own RPM packages, an entry like:

david          somehost=SOFTWARE

would allow them to run yum with no problems and get the package installed.

Now, I upgraded to F17 and this breaks, just like in the next sample trying to install the "clang" package (permission denied).

=========================================================================================================================================================================================  
Package                                 Arch                           Version                                          Repository            Size
========================================================================================================================================================================================= 
Installing:  clang                                   x86_64           
3.0-13.fc17                                      local-updates                                   7.0 M 
Installing for dependencies:  llvm                                    x86_64                                   3.0-13.fc17                   local-updates                                   1.1

Transaction Summary
========================================================================================================================================================================================= 
Install  1 Package (+1 Dependent package)

Total download size: 8.1 M Installed size: 26 M 
Is this ok [y/N]: y 
Downloading Packages: 
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 319, in user_main
    errcode = main(args)   
  File "/usr/share/yum-cli/yummain.py", line 227, in main
    return_code = base.doTransaction()   
  File "/usr/share/yum-cli/cli.py", line 559, in doTransaction
    problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb)    
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2313, in downloadPkgs
    urlgrabber.grabber.parallel_wait()   
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2259, in parallel_wait
    start(opts, 1)   
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2148, in start
    dl.start(opts)   
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2080, in start
    dl = _ExternalDownloader()   
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2003, in __init__
    stdout = subprocess.PIPE,   
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)   
  File "/usr/lib64/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception 
OSError: [Errno 13] Permission denied

The reported Python script /usr/lib64/python2.7/subprocess.py is user-readable (has rw-r--r--).

Any hints ?

share|improve this question
1  
yum is trying to exec another command calling subprocess.Popen(), for which you have no exec permission (probably curl or urlgrabber). –  guido Sep 15 '12 at 8:30
    
check if you can run /usr/libexec/urlgrabber-ext-down , if not you can add it to sudoers Cmnd_Alias or setuid it –  guido Sep 15 '12 at 8:44
    
What sudo(1) does is allow a user to start a process as root. Any processes fork(2)-ed from that onw will also belong to root, so I think @guido is wrong. –  vonbrand Jan 29 '13 at 11:43
    
@vonbrand execution bit still applies, being in a sudo session or not –  guido Jan 31 '13 at 3:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.