Bug 1282029 - [abrt] rpmconf: shutil.py:108:copyfile:PermissionError: [Errno 13] Permission denied: '/etc/pear.conf'
[abrt] rpmconf: shutil.py:108:copyfile:PermissionError: [Errno 13] Permission...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpmconf (Show other bugs)
22
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:0d73de5eec3314b740a389210f6...
: Reopened
: 1217681 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-14 08:33 EST by Timothy Ward
Modified: 2015-12-07 15:28 EST (History)
3 users (show)

See Also:
Fixed In Version: rpmconf-1.0.14 rpmconf-1.0.16-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 15:28:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Timothy Ward 2015-11-14 08:33:38 EST
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 08:33:43 EST
Created attachment 1094046 [details]
File: backtrace
Comment 2 Timothy Ward 2015-11-14 08:33:44 EST
Created attachment 1094047 [details]
File: environ
Comment 3 Miroslav Suchý 2015-11-16 02:51:57 EST
Rpmconf must be run under root user.
I should probably put check on top of the script.
Comment 4 Timothy Ward 2015-11-19 01:34:47 EST
The program is only run infrequently so the check to run under root IMO is worthwhile addition.
Comment 5 Miroslav Suchý 2015-11-22 08:23:41 EST
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 08:52:24 EST
*** Bug 1217681 has been marked as a duplicate of this bug. ***
Comment 7 Fedora Update System 2015-11-30 05:03:29 EST
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-11-30 21:22:45 EST
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 07:23:57 EST
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 17:31:17 EST
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 15:28:21 EST
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.