Bug 2425654

Summary: [abrt] python3-sdkmanager: move(): <frozen os>:236:makedirs:PermissionError: [Errno 13] Permission denied: '/opt/android-sdk/platform-tools'
Product: [Fedora] Fedora Reporter: Mr Beedell, Roke Julian Lockhart <8ru2u4gz>
Component: python-sdkmanagerAssignee: Benson Muite <benson_muite>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 43CC: 8ru2u4gz, benson_muite
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/3e51e01beacdcef4b3d6b6afa1ab60319ffc8b5
Whiteboard: abrt_hash:944260a9137ea477bb07b45ecaa2baa170265547;VARIANT_ID=kde;
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: environ
none
File: mountinfo
none
File: open_fds
none
File: namespaces
none
File: backtrace
none
File: cpuinfo none

Description Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:15 UTC
Description of problem:
Similar to https://bugzilla.redhat.com/show_bug.cgi?id=2422333#c0, when I invoked `sdkmanager "platform-tools" "cmdline-tools;latest"`.

Version-Release number of selected component:
python3-sdkmanager-0.6.10-6.fc43

Additional info:
reporter:       libreport-2.17.15
kernel:         6.17.12-300.fc43.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/sdkmanager platform-tools cmdline-tools;latest
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.kde.konsole-170949.scope/tab(197222).scope
uid:            1000
reason:         <frozen os>:236:makedirs:PermissionError: [Errno 13] Permission denied: '/opt/android-sdk/platform-tools'
executable:     /usr/bin/sdkmanager
type:           Python3
package:        python3-sdkmanager-0.6.10-6.fc43
runlevel:       /bin/sh: line 1: runlevel: command not found
exception_type: OSError
crash_function: move
interpreter:    python3-3.14.2-1.fc43.x86_64
comment:        Similar to https://bugzilla.redhat.com/show_bug.cgi?id=2422333#c0, when I invoked `sdkmanager "platform-tools" "cmdline-tools;latest"`.

Truncated backtrace:
<frozen os>:236:makedirs:PermissionError: [Errno 13] Permission denied: '/opt/android-sdk/platform-tools'

Traceback (most recent call last):
  File "/usr/lib64/python3.14/shutil.py", line 918, in move
    os.rename(src, real_dst)
    ~~~~~~~~~^^^^^^^^^^^^^^^
OSError: [Errno 18] Invalid cross-device link: '/tmp/.sdkmanager-49c9bw45/platform-tools' -> '/opt/android-sdk/platform-tools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/sdkmanager", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.14/site-packages/sdkmanager.py", line 1236, in main
    method(args.packages)
    ~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/sdkmanager.py", line 1071, in install
    _install_zipball_from_cache(zipball, install_dir)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/sdkmanager.py", line 1117, in _install_zipball_from_cache
    shutil.move(str(extracted), str(install_dir))
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/shutil.py", line 934, in move
    copytree(src, real_dst, copy_function=copy_function,
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             symlinks=True)
             ^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/shutil.py", line 654, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
                     ignore=ignore, copy_function=copy_function,
                     ignore_dangling_symlinks=ignore_dangling_symlinks,
                     dirs_exist_ok=dirs_exist_ok)
  File "/usr/lib64/python3.14/shutil.py", line 552, in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen os>", line 236, in makedirs
PermissionError: [Errno 13] Permission denied: '/opt/android-sdk/platform-tools'

Local variables in innermost frame:
name: '/opt/android-sdk/platform-tools'
mode: 511
exist_ok: False
head: '/opt/android-sdk'
tail: 'platform-tools'

Comment 1 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:18 UTC
Created attachment 2120253 [details]
File: os_info

Comment 2 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:19 UTC
Created attachment 2120254 [details]
File: environ

Comment 3 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:20 UTC
Created attachment 2120255 [details]
File: mountinfo

Comment 4 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:21 UTC
Created attachment 2120256 [details]
File: open_fds

Comment 5 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:22 UTC
Created attachment 2120257 [details]
File: namespaces

Comment 6 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:23 UTC
Created attachment 2120258 [details]
File: backtrace

Comment 7 Mr Beedell, Roke Julian Lockhart 2025-12-28 01:09:24 UTC
Created attachment 2120259 [details]
File: cpuinfo