Description of problem: Version-Release number of selected component: copr-frontend-1.132-1.fc28 Additional info: reporter: libreport-2.9.5 cmdline: /usr/bin/python3 /usr/share/copr/coprs_frontend/run/check_for_anitya_version_updates.py --backend pypi --delta=172800 crash_function: makedirs exception_type: PermissionError executable: /usr/share/copr/coprs_frontend/run/check_for_anitya_version_updates.py interpreter: python3-3.6.6-1.fc28.x86_64 kernel: 4.16.3-301.fc28.x86_64 runlevel: N 5 type: Python3 uid: 977 Truncated backtrace: os.py:220:makedirs:PermissionError: [Errno 13] Permission denied: '/usr/share/copr/coprs_frontend/coprs/../../data' Traceback (most recent call last): File "/usr/share/copr/coprs_frontend/run/check_for_anitya_version_updates.py", line 18, in <module> from coprs import db, app, helpers, models File "/usr/share/copr/coprs_frontend/coprs/__init__.py", line 34, in <module> whooshee = Whooshee(app) File "/usr/lib/python3.6/site-packages/flask_whooshee.py", line 215, in __init__ self.init_app(app) File "/usr/lib/python3.6/site-packages/flask_whooshee.py", line 250, in init_app os.makedirs(config['index_path_root']) File "/usr/lib64/python3.6/os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib64/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/usr/share/copr/coprs_frontend/coprs/../../data' Local variables in innermost frame: tail: 'data' head: '/usr/share/copr/coprs_frontend/coprs/../..' exist_ok: False mode: 511 name: '/usr/share/copr/coprs_frontend/coprs/../../data'
Created attachment 1475565 [details] File: backtrace
Created attachment 1475566 [details] File: cgroup
Created attachment 1475567 [details] File: cpuinfo
Created attachment 1475568 [details] File: environ
Created attachment 1475569 [details] File: mountinfo
Created attachment 1475570 [details] File: namespaces
Created attachment 1475571 [details] File: open_fds
I believe this is because python-flask-whooshee uses this: (file flask_whooshee.py) 249 if not os.path.exists(config['index_path_root']): 250 os.makedirs(config['index_path_root']) .. which is prone to race conditions. It would be better to do: try: os.makedirs(config['index_path_root']) except FileExistsError: pass
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
I submitted upstream pull request for the TOCTOU issue: https://github.com/bkabrda/flask-whooshee/pull/63/files Though anyway, the original problem seems to be in Copr project misconfiguration. Normally, the whooshee data directory is /var/lib/copr/data/whooshee/