Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ebe5ee0e0d0df207b285fb0432f21cfe9c8ed2a28b9125ae39252cbc5bdefa75
Ticket: cd609219f5522f3191a68a84deb51a968dfb8cac
directory creation temporarily changes the umask
User & Date: christian.nassau on 2023-04-05 18:01:59
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/html"
  4. comment changed to:
    In <tt>unix/tclUnixFCmd.c</tt> the following code is used to determine the process's current "umask":
    <blockquote>
    <pre>
    mode = umask(0);
    umask(mode)
    </pre>
    </blockquote>
    In the (usually miniscule) period between the two calls, the umask is temporarily set to 0 which results in <i>elevated permissions</i> for newly created files at that point. 
    
    As noted in <a href="https://man7.org/linux/man-pages/man2/umask.2.html">the umask man page</a> for modern Linux systems with a /proc filesystem there is a better way to determine the umask. It might make sense to use this when available.
    
  5. foundin changed to: "8.6.12"
  6. is_private changed to: "0"
  7. login: "christian.nassau"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "3b279cda57135cd36d2c32c66396637342913651"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "christian.nassau"
  14. subsystem changed to: "16. Commands A-H"
  15. title changed to: "directory creation temporarily changes the umask"
  16. type changed to: "Bug"