Bug 1282029 - [abrt] rpmconf: shutil.py:108:copyfile:PermissionError: [Errno 13] Permission denied: '/etc/pear.conf'
Summary: [abrt] rpmconf: shutil.py:108:copyfile:PermissionError: [Errno 13] Permission...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmconf
Version: 22
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:0d73de5eec3314b740a389210f6...
: 1217681 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-14 13:33 UTC by Timothy Ward
Modified: 2015-12-07 20:28 UTC (History)
3 users (show)

Fixed In Version: rpmconf-1.0.14 rpmconf-1.0.16-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 20:28:34 UTC


Attachments (Terms of Use)
File: backtrace (1.43 KB, text/plain)
2015-11-14 13:33 UTC, Timothy Ward
no flags Details
File: environ (3.47 KB, text/plain)
2015-11-14 13:33 UTC, Timothy Ward
no flags Details

Description Timothy Ward 2015-11-14 13:33:38 UTC
Description of problem:
1) Started rpmconf in a terminal
2) Tried to install the maintainers config file for the package pear
3) This error occured.

Version-Release number of selected component:
rpmconf-1.0.12-1.fc22

Additional info:
reporter:       libreport-2.6.3
cmdline:        /usr/bin/python3 /usr/sbin/rpmconf -a
executable:     /usr/sbin/rpmconf
kernel:         4.2.5-201.fc22.i686+PAE
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
shutil.py:108:copyfile:PermissionError: [Errno 13] Permission denied: '/etc/pear.conf'

Traceback (most recent call last):
  File "/usr/sbin/rpmconf", line 63, in <module>
    main()
  File "/usr/sbin/rpmconf", line 60, in main
    rconf.run()
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 90, in run
    self._handle_package(pkg_hdr)
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 264, in _handle_package
    tmp.format(conf_file, "rpmnew"))
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 310, in _handle_rpmnew
    self._overwrite(other_file, conf_file)
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 200, in _overwrite
    self._copy(src, dst)
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 182, in _copy
    shutil.copy2(src, dst)
  File "/usr/lib/python3.4/shutil.py", line 244, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.4/shutil.py", line 108, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/etc/pear.conf'

Local variables in innermost frame:
follow_symlinks: True
st: os.stat_result(st_mode=33188, st_ino=1324413, st_dev=64768, st_nlink=1, st_uid=0, st_gid=0, st_size=1141, st_atime=1446950293, st_mtime=1393206197, st_ctime=1393206197)
fsrc: <_io.BufferedReader name='/etc/pear.conf.rpmnew'>
dst: '/etc/pear.conf'
src: '/etc/pear.conf.rpmnew'
fn: '/etc/pear.conf'

Comment 1 Timothy Ward 2015-11-14 13:33:43 UTC
Created attachment 1094046 [details]
File: backtrace

Comment 2 Timothy Ward 2015-11-14 13:33:44 UTC
Created attachment 1094047 [details]
File: environ

Comment 3 Miroslav Suchý 2015-11-16 07:51:57 UTC
Rpmconf must be run under root user.
I should probably put check on top of the script.

Comment 4 Timothy Ward 2015-11-19 06:34:47 UTC
The program is only run infrequently so the check to run under root IMO is worthwhile addition.

Comment 5 Miroslav Suchý 2015-11-22 13:23:41 UTC
Fixed in commit:
* c7040d0 (HEAD -> master, origin/master, origin/HEAD) 1282029 - check for root privileges

Note: It is just warning as some features (like diff) can be still usefull without root.

Comment 6 Miroslav Suchý 2015-11-22 13:52:24 UTC
*** Bug 1217681 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2015-11-30 10:03:29 UTC
rpmconf-1.0.15-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8588d401cd

Comment 8 Fedora Update System 2015-12-01 02:22:45 UTC
rpmconf-1.0.15-1.fc23 has been pushed to the Fedora 23 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 'dnf --enablerepo=updates-testing update rpmconf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8588d401cd

Comment 9 Fedora Update System 2015-12-01 12:23:57 UTC
rpmconf-1.0.16-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8588d401cd

Comment 10 Fedora Update System 2015-12-01 22:31:17 UTC
rpmconf-1.0.16-1.fc23 has been pushed to the Fedora 23 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 'dnf --enablerepo=updates-testing update rpmconf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8588d401cd

Comment 11 Fedora Update System 2015-12-07 20:28:21 UTC
rpmconf-1.0.16-1.fc23 has been pushed to the Fedora 23 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.