Skip to content

Only set permissions for current user's files in main dir - #406

Merged
hugovk merged 1 commit into
python:mainfrom
hugovk:fix-permissions
Jun 5, 2026
Merged

Only set permissions for current user's files in main dir#406
hugovk merged 1 commit into
python:mainfrom
hugovk:fix-permissions

Conversation

@hugovk

@hugovk hugovk commented Jun 3, 2026

Copy link
Copy Markdown
Member

Follow on from #391.

This happened during yesterday's 3.15.0b2 release:

✅  Upload files to the PSF downloads server
💥  Place files in the download folder
Traceback (most recent call last):
  File "/Users/hugo/github/release-tools/run_release.py", line 1504, in <module>
    main()
    ~~~~^^
  File "/Users/hugo/github/release-tools/run_release.py", line 1500, in main
    automata.run()
    ~~~~~~~~~~~~^^
  File "/Users/hugo/github/release-tools/run_release.py", line 255, in run
    raise e from None
  File "/Users/hugo/github/release-tools/run_release.py", line 252, in run
    self.current_task(self.db)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/hugo/github/release-tools/release.py", line 151, in __call__
    return getattr(self, "function")(db)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/Users/hugo/github/release-tools/run_release.py", line 828, in place_files_in_download_folder
    copy_and_set_permissions(f"{source}/downloads/*", destination)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hugo/github/release-tools/run_release.py", line 824, in copy_and_set_permissions
    execute_command(
    ~~~~~~~~~~~~~~~^
        f"find {destination} -type f ! -perm 664 -exec chmod 664 {{}} +"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/hugo/github/release-tools/run_release.py", line 810, in execute_command
    raise ReleaseException(channel.recv_stderr(1000))
ReleaseException: b'find: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/test_pdb.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/tcltk.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/exe_d.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/lib.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/dev.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/ucrt.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/doc.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/tcltk_d.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/freethreaded_pdb.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/exe_pdb.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ftp/python/3.15.0/amd64a1/core_d.msi\xe2\x80\x99: Permission denied\nfind: \xe2\x80\x98/srv/www.python.org/ft'

What happened:

There were already Windows files and subdirs (for example 3.15.0/amd64a1/) owned by sdower in the directory, and it failed when trying to set new permissions on them.

The fix is only to attempt setting them in the top level 3.15.0/ (-maxdepth 1) and only for the files owned by the current user (-user $USER), which is the RM who just uploaded the source/Android/etc files.

Yesterday, I made this change locally, and continued the release, and it worked fine.

@hugovk
hugovk merged commit a0a84ff into python:main Jun 5, 2026
18 checks passed
@hugovk
hugovk deleted the fix-permissions branch June 5, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants