tooltool upload should set file permissions to world readable

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
3 years ago
20 days ago

People

(Reporter: nthomas, Assigned: simone)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Did my first upload with https://wiki.mozilla.org/ReleaseEngineering/Applications/Tooltool#How_to_upload_to_tooltool, and I hadn't paid any attention to the permissions set on the stage files. They happened to be 640, which wasn't changed by the upload, so the files weren't visible to Apache.

How about we enforce 644, or at least a=r.
(Assignee)

Updated

3 years ago
Assignee: nobody → sbruno
(Assignee)

Comment 1

3 years ago
Created attachment 8452997 [details] [diff] [review]
tooltool_01.patch

After copying, explicitly sets permissions to 644
Attachment #8452997 - Flags: review?(rail)
Comment on attachment 8452997 [details] [diff] [review]
tooltool_01.patch

Review of attachment 8452997 [details] [diff] [review]:
-----------------------------------------------------------------

::: sync.py
@@ +240,5 @@
>                              try:
> +                                target_filename = os.path.join(destination, "temp%s" % digest)
> +                                shutil.copy(digest_path, target_filename)
> +                                # 420 is decimal for 644 (octal), sets permission to -rw-r--r-- to make sure the file is readable
> +                                os.chmod(target_filename, 420)

Can you replace 420 with 0644 (with leading zero) please. It's more readable. The comments would look simpler in this case. :)

Otherwise looks good to me.
Attachment #8452997 - Flags: review?(rail) → review+
(Assignee)

Comment 3

3 years ago
Great! I did not figure out I could just put 0644. Thanks!
(Assignee)

Comment 4

3 years ago
Comment on attachment 8452997 [details] [diff] [review]
tooltool_01.patch

Checked in, https://github.com/mozilla/build-tooltool/commit/df387e9144ddc88a698bf01595984c1373094a7d
Attachment #8452997 - Flags: checked-in+
(Assignee)

Comment 5

3 years ago
Deployed on relengwebadm.private.scl3.mozilla.com.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Component: Tools → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.